<!DOCTYPE html>
<html lang="en-GB" data-critters-container>
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
    <!-- Indexing controlled by X-Robots-Tag in public/_headers -->
    <meta name="theme-color" content="#1F2933">
    
    <!-- Critical inline styles to prevent FOUC (Flash of Unstyled Content) -->
    <style>html,body,#root{margin:0;padding:0}@media (max-width: 767px){html,body,#root{background-color:#1A1F26}}@media (min-width: 768px){html,body,#root{background-color:#FAFBFC}}*,:before,:after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}strong{font-weight:bolder}h2,p{margin:0}ul{list-style:none;margin:0;padding:0}:root{--background:210 20% 99%;--foreground:222 47% 11%;--card:0 0% 100%;--card-foreground:222 47% 11%;--popover:0 0% 100%;--popover-foreground:222 47% 11%;--primary:213 94% 48%;--primary-foreground:0 0% 100%;--primary-hover:213 94% 40%;--secondary:215 24% 26%;--secondary-foreground:210 40% 98%;--muted:215 20% 65%;--muted-foreground:222 47% 11%;--accent:210 40% 98%;--accent-foreground:215 19% 34%;--destructive:0 72% 50%;--destructive-foreground:0 85% 97%;--border:212 26% 83%;--input:212 26% 83%;--ring:200 98% 39%;--nhs-blue:213 94% 48%;--nhs-grey:210 20% 92%;--nhs-text:222 47% 11%;--nhs-success:142 76% 42%;--nhs-amber:38 92% 50%;--nhs-red:0 84% 60%;--nhs-dark-red:0 100% 27%;--climate-ocean:200 85% 45%;--climate-sky:200 60% 88%;--climate-forest:155 45% 45%;--climate-sage:155 25% 88%;--climate-earth:25 35% 65%;--climate-mist:200 20% 96%;--climate-slate:215 15% 50%;--trust-blue:217 91% 50%;--trust-blue-hover:217 91% 42%;--heading-black:222 47% 11%;--primary-action:213 94% 48%;--primary-action-hover:213 94% 40%;--homepage-primary:213 94% 48%;--homepage-secondary:199 70% 60%;--homepage-accent:213 94% 48%;--homepage-bg:0 0% 100%;--homepage-neutral-dark:222 47% 11%;--homepage-neutral-mid:215 16% 47%;--homepage-neutral-light:210 20% 90%;--hero-bg:215 18% 17%;--hero-bg-mobile:216 18% 13%;--map-flood-rivers:155 38% 63%;--map-flood-surface:253 92% 85%;--muted:210 20% 96%;--muted-foreground:215 16% 47%;--accent:210 20% 96%;--accent-foreground:222 47% 11%;--risk-low:142 45% 42%;--risk-low-foreground:0 0% 100%;--risk-low-bg:145 18% 96%;--risk-medium:38 65% 49%;--risk-medium-foreground:0 0% 100%;--risk-medium-bg:43 25% 96%;--risk-high:14 65% 54%;--risk-high-foreground:0 0% 100%;--risk-high-bg:0 25% 96%;--risk-very-high:0 68% 48%;--risk-very-high-foreground:0 0% 100%;--risk-very-high-bg:0 25% 95%;--risk-subsidence:25 45% 45%;--risk-subsidence-foreground:0 0% 100%;--risk-subsidence-bg:25 35% 96%;--hazard-flood-blue:205 85% 55%;--hazard-flood-bg:205 85% 96%;--hazard-air-green:142 50% 50%;--hazard-air-bg:142 50% 96%;--hazard-heat-red:0 70% 60%;--hazard-heat-bg:0 70% 96%;--hazard-subsidence-brown:25 50% 50%;--hazard-subsidence-bg:25 50% 96%;--map-flood-rivers:210 90% 60%;--map-flood-surface:145 60% 45%;--amber-disclaimer-bg:43 96% 92%;--amber-disclaimer-border:43 96% 56%;--amber-disclaimer-text:43 96% 25%;--destructive:0 84% 60%;--destructive-foreground:0 0% 100%;--border:214 20% 88%;--input:210 20% 96%;--ring:213 94% 48%;--radius:1rem;--gradient-primary:linear-gradient(135deg, hsl(var(--nhs-blue)) 0%, hsl(var(--nhs-success)) 100%);--gradient-subtle:linear-gradient(180deg, hsl(var(--background)) 0%, hsl(var(--muted)/.1) 100%);--gradient-risk:linear-gradient(90deg, hsl(var(--risk-low)) 0%, hsl(var(--risk-high)) 100%);--gradient-hero:linear-gradient(135deg, hsl(var(--nhs-blue)/.05) 0%, hsl(var(--nhs-success)/.05) 50%, hsl(var(--background)) 100%);--gradient-glass:linear-gradient(135deg, hsl(var(--background)/.8) 0%, hsl(var(--background)/.4) 100%);--gradient-radial:radial-gradient(circle, hsl(var(--primary)/.15) 0%, transparent 70%);--shadow-elegant:0 20px 40px -12px hsl(var(--nhs-blue) / .15);--shadow-glow:0 0 60px hsl(var(--nhs-success) / .2);--shadow-card:0 8px 32px -8px hsl(var(--nhs-blue) / .12);--shadow-glass:0 8px 32px 0 hsl(var(--nhs-blue) / .08);--shadow-depth:0 4px 16px -2px hsl(var(--nhs-blue) / .1), 0 2px 8px -2px hsl(var(--nhs-blue) / .06);--sidebar-background:0 0% 100%;--sidebar-foreground:222 47% 11%;--sidebar-primary:213 94% 48%;--sidebar-primary-foreground:0 0% 100%;--sidebar-accent:210 20% 96%;--sidebar-accent-foreground:222 47% 11%;--sidebar-border:214 20% 90%;--sidebar-ring:213 94% 48%;--chart-1:198 93% 59%;--chart-2:213 93% 67%;--chart-3:215 20% 65%;--chart-4:215 16% 46%;--chart-5:215 19% 34%;--sidebar:210 40% 98%;--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;--font-serif:"Lora", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:"Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--shadow-2xs:0 1px 3px 0px hsl(0 0% 0% / .05);--shadow-xs:0 1px 3px 0px hsl(0 0% 0% / .05);--shadow-sm:0 1px 3px 0px hsl(0 0% 0% / .1), 0 1px 2px -1px hsl(0 0% 0% / .1);--shadow:0 1px 3px 0px hsl(0 0% 0% / .1), 0 1px 2px -1px hsl(0 0% 0% / .1);--shadow-md:0 1px 3px 0px hsl(0 0% 0% / .1), 0 2px 4px -1px hsl(0 0% 0% / .1);--shadow-lg:0 1px 3px 0px hsl(0 0% 0% / .1), 0 4px 6px -1px hsl(0 0% 0% / .1);--shadow-xl:0 1px 3px 0px hsl(0 0% 0% / .1), 0 8px 10px -1px hsl(0 0% 0% / .1);--shadow-2xl:0 1px 3px 0px hsl(0 0% 0% / .25);--tracking-normal:0em;--spacing:.25rem}body{background-color:hsl(var(--background));color:hsl(var(--foreground));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif;font-feature-settings:"rlig" 1,"calt" 1;touch-action:manipulation;-webkit-overflow-scrolling:touch;overscroll-behavior:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}#root{position:relative;overflow-x:clip;min-height:100vh}h2{font-size:22px;font-weight:600;line-height:1.3;letter-spacing:-.01em;color:#0a0a0a}@media (min-width: 768px){h2{font-size:28px;line-height:1.35}}@media (min-width: 1280px){h2{font-size:32px}}@media (min-width: 1536px){h2{font-size:36px}}body{font-family:Inter,sans-serif;font-size:16px;line-height:1.45;letter-spacing:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}@media print{html,body{background:#fff!important;color:#111!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}*{background-color:#fff!important;background-image:none!important;box-shadow:none!important;filter:none!important;text-shadow:none!important}h2,p,div{color:#111!important}}</style>
    
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <!-- Preconnect to Supabase API for faster edge function calls.
         crossorigin is required for credentialed fetch() calls (Authorization header) -->
    <link rel="preconnect" href="https://llfzjghbyrhabfmvmiff.supabase.co" crossorigin>
    <!-- DNS prefetch for APIs not on the critical path for the homepage -->
    <link rel="dns-prefetch" href="https://api.postcodes.io">
    <link rel="dns-prefetch" href="https://api.openweathermap.org">
    <link rel="dns-prefetch" href="https://flood-warning-information.service.gov.uk">
    <!-- DNS prefetch for analytics (only loaded on production) -->
    <link rel="dns-prefetch" href="https://plausible.io">
    <!-- DNS prefetch for map tile servers (loaded lazily when map renders, not on critical path) -->
    <link rel="dns-prefetch" href="https://a.basemaps.cartocdn.com">
    <link rel="dns-prefetch" href="https://b.basemaps.cartocdn.com">
    <link rel="dns-prefetch" href="https://c.basemaps.cartocdn.com">
    <!-- Preload desktop hero image (LCP element) so it starts fetching immediately -->
    <link rel="preload" as="image" href="/images/hero-background.webp" type="image/webp" media="(min-width: 768px)" fetchpriority="high">
    <!-- Preload mobile hero background - small version for 1x screens, full for retina -->
    <link rel="preload" as="image" href="/images/mobile-topo-bg-sm.webp" type="image/webp" media="(max-width: 767px)" fetchpriority="high" imagesrcset="/images/mobile-topo-bg-sm.webp 512w, /images/mobile-topo-bg.webp 1024w" imagesizes="100vw">

    <!-- Google Fonts - deferred to unblock render (non-blocking load pattern) -->
    <!-- Inter: primary UI font. Fraunces: display headings only (FAQ, section titles) -->
    <link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap" onload="this.onload=null;this.rel='stylesheet'">
    <noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap"></noscript>

    <!-- Favicon -->
    <link rel="icon" type="image/svg+xml" href="/favicon.svg">
    <link rel="icon" type="image/png" href="/favicon.png">
    <link rel="apple-touch-icon" href="/apple-touch-icon.png">
    <link rel="manifest" href="/site.webmanifest?v=4">

    <title>UK Flood &amp; Subsidence Risk Checker by Postcode | LocalRisk</title>
    <meta name="description" content="Free UK flood risk map and climate checker by postcode. Check flood zones, heat, air quality and subsidence using Environment Agency and Met Office data.">
    <link rel="canonical" href="https://localrisk.co.uk">
    <meta name="robots" content="index, follow, max-image-preview:large">
    <meta name="author" content="LocalRisk">
    <meta name="google-site-verification" content="W3kDFMBDYvyTrYpymzQxG68RAF_yt5L45m1eCE1ttdo">
    <meta name="msvalidate.01" content="17110F7B443790FA9BBFAE4E03397F7F">

    <meta property="og:site_name" content="LocalRisk">
    <meta property="og:type" content="website">
    <meta property="og:image" content="https://localrisk.co.uk/og-image.png?v=5">
    <meta property="og:image:type" content="image/png">
    <meta property="og:image:width" content="1200">
    <meta property="og:image:height" content="630">

    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:image" content="https://localrisk.co.uk/og-image.png?v=5">

    <!-- Schema.org structured data for Organization -->
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "Organization",
      "@id": "https://localrisk.co.uk/#organization",
      "name": "LocalRisk",
      "alternateName": ["LocalRisk UK Climate Risk Checker", "UK Flood & Subsidence Risk Checker"],
      "url": "https://localrisk.co.uk",
      "description": "Free UK climate risk checker covering flood zones, heat stress, air quality and subsidence for 1.8 million postcodes. Built on official data from the Environment Agency, Met Office, Defra and British Geological Survey.",
      "foundingDate": "2025",
      "logo": {
        "@type": "ImageObject",
        "url": "https://localrisk.co.uk/localrisk-pin-icon-transparent.png",
        "width": "509",
        "height": "505"
      },
      "image": "https://localrisk.co.uk/og-image.png?v=5",
      "areaServed": {
        "@type": "Country",
        "name": "United Kingdom"
      },
      "knowsAbout": [
        "UK flood risk",
        "Climate risk assessment",
        "Subsidence risk",
        "Air quality monitoring",
        "Heat stress projections",
        "Environment Agency flood zones",
        "UKCP18 climate projections"
      ]
    }
    </script>

    <!-- Schema.org WebSite with SearchAction for sitelinks search box -->
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "WebSite",
      "url": "https://localrisk.co.uk",
      "name": "LocalRisk",
      "publisher": { "@type": "Organization", "@id": "https://localrisk.co.uk/#organization" },
      "potentialAction": {
        "@type": "SearchAction",
        "target": "https://localrisk.co.uk/postcode/{search_term_string}",
        "query-input": "required name=search_term_string"
      }
    }
    </script>

    <!-- Privacy-friendly analytics by Plausible (cookieless, GDPR-compliant, no consent required) -->
    <script>
      (function() {
        var host = window.location.hostname;
        var isProd = host === 'localrisk.co.uk' || host === 'www.localrisk.co.uk';
        var ignored = localStorage.getItem('plausible_ignore') === 'true';

        // Only load if production AND not ignored (for developers)
        if (!(isProd && !ignored)) {
          window.plausible = window.plausible || function(){};
          return;
        }

        // Load Plausible - cookieless analytics for all visitors
        var s = document.createElement('script');
        s.defer = true;
        s.setAttribute('data-domain', 'localrisk.co.uk');
        s.src = 'https://plausible.io/js/script.js';
        document.head.appendChild(s);
        
        // Setup plausible function for custom events
        window.plausible = window.plausible || function() { 
          (window.plausible.q = window.plausible.q || []).push(arguments);
        };
      })();
    </script>

    <!-- Google Ads tag (consent-gated: only loads after user accepts cookies) -->
    <script>
      (function() {
        if (localStorage.getItem('cookie_consent') !== 'accepted') return;
        var g = document.createElement('script');
        g.async = true;
        g.src = 'https://www.googletagmanager.com/gtag/js?id=AW-17953335467';
        document.head.appendChild(g);
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'AW-17953335467');
      })();
    </script>

    <script type="module" crossorigin src="/assets/index-BfiMxUJW.js"></script>
    <link rel="modulepreload" crossorigin href="/assets/vendor-ui-Ie2OTfH8.js">
    <link rel="modulepreload" crossorigin href="/assets/vendor-charts-DC2o68hj.js">
    <link rel="modulepreload" crossorigin href="/assets/vendor-icons-B49im567.js">
    <link rel="modulepreload" crossorigin href="/assets/vendor-query-DQE6QAYt.js">
    <link rel="modulepreload" crossorigin href="/assets/vendor-react-CCThgY7b.js">
    <link rel="stylesheet" crossorigin href="/assets/index-CbWcPvxW.css" onload="this.rel='stylesheet'"><noscript><link rel="stylesheet" crossorigin href="/assets/index-CbWcPvxW.css" onload="this.rel='stylesheet'"></noscript>
  </head>

  <body>
    <div id="root"></div>
    <noscript>
      <div style="max-width:800px;margin:0 auto;padding:40px 20px;font-family:system-ui,sans-serif;color:#1a1a2e">
        <p>UK Flood &amp; Subsidence Risk Checker by Postcode</p>
        <p>LocalRisk is a free climate risk checker covering 1.8 million UK postcodes. Check flood zones, heat projections, air quality and subsidence risk for any location using official data from the Environment Agency, Met Office, DEFRA and British Geological Survey.</p>
        <h2>What we assess</h2>
        <ul>
          <li><strong>Flood risk</strong> – Environment Agency flood zone data and surface water risk</li>
          <li><strong>Heat risk</strong> – Met Office climate projections for extreme heat days</li>
          <li><strong>Air quality</strong> – DEFRA PM2.5 monitoring and pollution data</li>
          <li><strong>Subsidence</strong> – British Geological Survey shrink-swell clay risk</li>
        </ul>
        <h2>Explore the site</h2>
        <ul>
          <li><a href="/local-areas">Browse local council areas</a></li>
          <li><a href="/compare">Compare two locations</a></li>
          <li><a href="/top-tens">Top 10 climate risk rankings</a></li>
          <li><a href="/browse">Browse all UK postcodes</a></li>
          <li><a href="/methodology">Our data sources and methodology</a></li>
        </ul>
        <p>Enter any UK postcode to get a free climate risk report covering flood, heat, air quality, subsidence and coastal erosion.</p>
      </div>
    </noscript>
    <!-- SEO: route-specific meta tags, JSON-LD, and content overlay.
         Placed in <body> (not <head>) so it does not block HTML parsing.
         Meta tag injection works from either location; preview overlay needs #root which
         exists at this point. Bots receive canonical meta from seo-inject.ts instead. -->
    <script>
    (function () {
      var SITE = 'https://localrisk.co.uk';
      var BRAND = 'LocalRisk';
      var ROBOTS = 'index, follow, max-image-preview:large';
      var path = location.pathname;
      var search = location.search;

      // Postcode area → region name lookup (~120 entries)
      var PC_AREAS = {
        'AB':'Aberdeen','AL':'St Albans','B':'Birmingham','BA':'Bath',
        'BB':'Blackburn','BD':'Bradford','BH':'Bournemouth','BL':'Bolton',
        'BN':'Brighton','BR':'Bromley','BS':'Bristol','BT':'Belfast',
        'CA':'Carlisle','CB':'Cambridge','CF':'Cardiff','CH':'Chester',
        'CM':'Chelmsford','CO':'Colchester','CR':'Croydon','CT':'Canterbury',
        'CV':'Coventry','CW':'Crewe','DA':'Dartford','DD':'Dundee',
        'DE':'Derby','DG':'Dumfries','DH':'Durham','DL':'Darlington',
        'DN':'Doncaster','DT':'Dorchester','DY':'Dudley','E':'East London',
        'EC':'City of London','EH':'Edinburgh','EN':'Enfield','EX':'Exeter',
        'FK':'Falkirk','FY':'Blackpool','G':'Glasgow','GL':'Gloucester',
        'GU':'Guildford','HA':'Harrow','HD':'Huddersfield','HG':'Harrogate',
        'HP':'Hemel Hempstead','HR':'Hereford','HS':'Outer Hebrides',
        'HU':'Hull','HX':'Halifax','IG':'Ilford','IP':'Ipswich',
        'IV':'Inverness','KA':'Kilmarnock','KT':'Kingston upon Thames',
        'KW':'Kirkwall','KY':'Kirkcaldy','L':'Liverpool','LA':'Lancaster',
        'LD':'Llandrindod Wells','LE':'Leicester','LL':'Llandudno',
        'LN':'Lincoln','LS':'Leeds','LU':'Luton','M':'Manchester',
        'ME':'Medway','MK':'Milton Keynes','ML':'Motherwell',
        'N':'North London','NE':'Newcastle upon Tyne','NG':'Nottingham',
        'NN':'Northampton','NP':'Newport','NR':'Norwich','NW':'North West London',
        'OL':'Oldham','OX':'Oxford','PA':'Paisley','PE':'Peterborough',
        'PH':'Perth','PL':'Plymouth','PO':'Portsmouth','PR':'Preston',
        'RG':'Reading','RH':'Redhill','RM':'Romford','S':'Sheffield',
        'SA':'Swansea','SE':'South East London','SG':'Stevenage',
        'SK':'Stockport','SL':'Slough','SM':'Sutton','SN':'Swindon',
        'SO':'Southampton','SP':'Salisbury','SR':'Sunderland','SS':'Southend',
        'ST':'Stoke-on-Trent','SW':'South West London','SY':'Shrewsbury',
        'TA':'Taunton','TD':'Galashiels','TF':'Telford','TN':'Tunbridge Wells',
        'TQ':'Torquay','TR':'Truro','TS':'Cleveland','TW':'Twickenham',
        'UB':'Southall','W':'West London','WA':'Warrington','WC':'West Central London',
        'WD':'Watford','WF':'Wakefield','WN':'Wigan','WR':'Worcester',
        'WS':'Walsall','WV':'Wolverhampton','YO':'York','ZE':'Lerwick'
      };

      function fmtPC(pc) {
        var c = pc.replace(/\s/g, '').toUpperCase();
        return c.length >= 5 ? c.slice(0, -3) + ' ' + c.slice(-3) : c;
      }

      function slugName(s) {
        return s.split('-').map(function (w) {
          return w.charAt(0).toUpperCase() + w.slice(1);
        }).join(' ');
      }

      function getArea(pc) {
        var clean = pc.replace(/\s/g, '').toUpperCase();
        var two = clean.substring(0, 2);
        if (PC_AREAS[two]) return PC_AREAS[two];
        var one = clean.substring(0, 1);
        return PC_AREAS[one] || null;
      }

      function esc(s) {
        return s.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
      }

      // Static page definitions (mirrors edge function STATIC_PAGES)
      var STATIC = {
        '/': {
          title: 'UK Flood & Subsidence Risk Checker by Postcode | ' + BRAND,
          desc: 'Free UK flood risk map and climate checker by postcode. Check flood zones, heat, air quality and subsidence using Environment Agency and Met Office data.',
          canonical: SITE,
          robots: ROBOTS,
          ogType: 'website'
        },
        '/compare': {
          title: 'Compare Flood & Climate Risks Between Postcodes | ' + BRAND,
          desc: 'Compare flood zones, heat, air quality and subsidence risks side-by-side for any two UK postcodes.',
          canonical: SITE + '/compare',
          robots: ROBOTS
        },
        '/local-areas': {
          title: 'Flood Risk Map by Council Area: Heat, Air & Subsidence | ' + BRAND,
          desc: 'Browse flood risk maps and climate profiles for every council area in the UK. Flood zones, heat, air quality and subsidence data at a glance.',
          canonical: SITE + '/local-areas',
          robots: ROBOTS
        },
        '/top-tens': {
          title: 'Top 10 UK Flood & Climate Risk Rankings | ' + BRAND,
          desc: 'Top 10 UK areas for lower flood risk, cleaner air, milder winters and stable ground \u2014 plus the most exposed. Based on three years of observations and national screening data.',
          canonical: SITE + '/top-tens',
          robots: ROBOTS
        },
        '/browse': {
          title: 'Browse All UK Postcodes | ' + BRAND,
          desc: 'Browse climate risk data for every UK postcode. Search by area or postcode prefix.',
          canonical: SITE + '/browse',
          robots: ROBOTS
        },
        '/sitemap': {
          title: 'HTML Sitemap | ' + BRAND,
          desc: 'Complete sitemap of all LocalRisk pages including postcode reports, council profiles and tools.',
          canonical: SITE + '/sitemap',
          robots: ROBOTS
        },
        '/methodology': {
          title: 'How UK Climate Risk Is Calculated | Data Methodology | ' + BRAND,
          desc: 'How LocalRisk calculates flood, heat, air quality and subsidence risk scores using open government data.',
          canonical: SITE + '/methodology',
          robots: ROBOTS
        },
        '/accessibility': {
          title: 'Accessibility Statement | ' + BRAND,
          desc: 'Accessibility statement for the LocalRisk website.',
          canonical: SITE + '/accessibility',
          robots: ROBOTS
        },
        '/privacy-policy': {
          title: 'Privacy Policy | ' + BRAND,
          desc: 'Privacy policy for the LocalRisk website.',
          canonical: SITE + '/privacy-policy',
          robots: ROBOTS
        },
        '/terms': {
          title: 'Terms of Use | ' + BRAND,
          desc: 'Terms of use for the LocalRisk website.',
          canonical: SITE + '/terms',
          robots: ROBOTS
        },
        '/about': {
          title: 'About LocalRisk | UK Climate Risk Data | ' + BRAND,
          desc: 'Who built LocalRisk, why it exists, and how we use official UK government data to help home movers and property investors understand climate risk.',
          canonical: SITE + '/about',
          robots: ROBOTS
        },
        '/guide/flood': {
          title: 'Flood Risk by Postcode | Free UK Flood Zone Check | ' + BRAND,
          desc: 'Check flood risk by postcode. Environment Agency, NRW and SEPA flood zone data for 1.8 million UK postcodes.',
          canonical: SITE + '/guide/flood',
          robots: ROBOTS
        },
        '/guide/subsidence': {
          title: 'Subsidence Risk Postcode Checker | Free UK Data | ' + BRAND,
          desc: 'Check subsidence risk by postcode. BGS GeoClimate shrink-swell data for 1.8M UK postcodes.',
          canonical: SITE + '/guide/subsidence',
          robots: ROBOTS
        },
        '/guide/heat-risk': {
          title: 'Heat Risk by Postcode | UK Climate Projections | ' + BRAND,
          desc: 'Check heat risk by postcode. Met Office UKCP18 climate projections for 1.8M UK postcodes.',
          canonical: SITE + '/guide/heat-risk',
          robots: ROBOTS
        },
        '/guide/air-quality': {
          title: 'Air Quality by Postcode | Free UK PM2.5 Check | ' + BRAND,
          desc: 'Check air quality by postcode. DEFRA PM2.5 data for 1.8M UK postcodes.',
          canonical: SITE + '/guide/air-quality',
          robots: ROBOTS
        },
        '/guide/property-climate-risk': {
          title: 'Climate Risk When Buying a House | Free Guide | ' + BRAND,
          desc: 'How flood, heat, subsidence and air quality affect UK property buying, insurance and conveyancing.',
          canonical: SITE + '/guide/property-climate-risk',
          robots: ROBOTS
        },
        '/guide/subsidence-insurance': {
          title: 'Subsidence Insurance | Home Insurance Guide | ' + BRAND,
          desc: 'How subsidence risk affects your home insurance - what buildings policies cover, how premiums are calculated, what happens after a claim, and what to do if your house has been underpinned.',
          canonical: SITE + '/guide/subsidence-insurance',
          robots: ROBOTS
        },
        '/insights': {
          title: 'City Climate Insights | ' + BRAND,
          desc: 'In-depth climate risk analysis for UK cities. Explore flood exposure, heat stress, air quality and more \u2014 told through the story of real places.',
          canonical: SITE + '/insights',
          robots: ROBOTS
        }
      };

      // Route matching
      var meta = null;
      var jsonLd = null;
      var previewHtml = null;

      var pcMatch = path.match(/^\/postcode\/([A-Za-z0-9+% ]{3,12})\/?$/i);
      var councilMatch = path.match(/^\/council\/([a-z0-9-]+)\/?$/i);

      // Area-specific risk hooks for meta descriptions (Layer 1: pre-React, no API data)
      var AREA_HOOKS = {
        'E':'central London \u2014 higher heat and air quality exposure than most of the UK',
        'EC':'the City of London \u2014 one of the UK\u2019s densest urban heat islands',
        'N':'north London \u2014 elevated heat and air quality risk for the capital',
        'NW':'north-west London \u2014 higher heat and air quality exposure than most of the UK',
        'SE':'south-east London \u2014 higher heat and Thames flood risk overlap',
        'SW':'south-west London \u2014 elevated heat, air and riverside flood exposure',
        'W':'west London \u2014 higher heat and air quality risk for the capital',
        'WC':'central London \u2014 one of the UK\u2019s most heat-exposed zones',
        'M':'Greater Manchester \u2014 mixed flood exposure and moderate air quality concerns',
        'B':'Birmingham \u2014 elevated heat and air quality risk for the West Midlands',
        'L':'Liverpool \u2014 mixed flood and air quality signals across Merseyside',
        'LS':'Leeds \u2014 mixed flood exposure across the Aire valley',
        'S':'Sheffield \u2014 steep terrain creates varied flood and subsidence risk',
        'BS':'Bristol \u2014 tidal flood exposure meets urban heat and air quality risk',
        'HU':'Hull \u2014 one of the UK\u2019s most flood-exposed cities',
        'CF':'Cardiff \u2014 tidal and river flood exposure across South Wales',
        'EH':'Edinburgh \u2014 lower heat risk but localised flood and ground movement signals',
        'G':'Glasgow \u2014 river flood exposure and moderate air quality concerns',
        'BT':'Belfast \u2014 mixed flood and ground movement risk across Northern Ireland',
        'BN':'Brighton \u2014 coastal flood and chalk subsidence risk along the South Downs'
      };

      if (pcMatch) {
        var raw = decodeURIComponent(pcMatch[1].replace(/\+/g, ' '));
        var fmt = fmtPC(raw);
        var clean = fmt.replace(/\s/g, '');
        var area = getArea(raw);
        var areaDesc = area || 'the UK';

        // Set generic title/desc here for users (before React hydrates).
        // seo-inject.ts provides richer settlement-enriched titles for bots.
        // React Helmet will override with area-specific version once data loads.
        meta = {
          title: fmt + ' Flood & Subsidence Risk',
          desc: 'Free flood, heat, air quality and subsidence risk check for ' + fmt + (area ? ' in ' + area : '') + '. Environment Agency and Met Office data.',
          canonical: SITE + '/postcode/' + clean,
          robots: ROBOTS,
          ogImage: 'https://llfzjghbyrhabfmvmiff.supabase.co/functions/v1/og-image?pc=' + clean
        };

        jsonLd = [];  // BreadcrumbList now handled by seoUtils.ts

        previewHtml =
          '<div id="ep" style="position:absolute;left:-9999px;top:-9999px;max-width:700px;padding:48px 24px;font-family:system-ui,sans-serif;color:#1a1a2e;transition:opacity .3s" aria-hidden="true">' +
          '<p style="text-transform:uppercase;letter-spacing:2px;font-size:12px;color:#6b7280;margin:0 0 8px">LOCATION</p>' +
          '<p style="font-size:28px;margin:0 0 4px">' + esc(fmt) + '</p>' +
          (area ? '<p style="font-size:18px;color:#4b5563;margin:0 0 20px">' + esc(area) + '</p>' : '') +
          '<p style="font-size:16px;line-height:1.6;color:#374151">' +
          'Climate risk screening for ' + esc(fmt) + ' in ' + esc(areaDesc) +
          '. This report covers flood risk (Environment Agency), heat projections (Met Office UKCP18), ' +
          'air quality PM2.5 (Defra), and ground movement risk (British Geological Survey).</p>' +
          '<p style="font-size:14px;color:#9ca3af;margin-top:16px">Loading full climate report\u2026</p>' +
          '</div>';

      } else if (councilMatch) {
        var slug = councilMatch[1].toLowerCase();
        // SEO city-name overrides for common search queries
        var CITY_NAMES = {
          'city-of-london':'London (City)','city-of-westminster':'Westminster, London',
          'city-of-edinburgh':'Edinburgh','city-of-glasgow':'Glasgow',
          'city-of-aberdeen':'Aberdeen','city-of-dundee':'Dundee',
          'bristol-city-of':'Bristol','kingston-upon-hull-city-of':'Hull',
          'brighton-and-hove':'Brighton & Hove','newcastle-upon-tyne':'Newcastle',
          'bournemouth-christchurch-and-poole':'Bournemouth & Poole',
          'armagh-city-banbridge-and-craigavon':'Armagh, Banbridge & Craigavon',
          'lisburn-and-castlereagh':'Lisburn & Castlereagh',
          'plymouth':'Plymouth','southampton':'Southampton',
          'portsmouth':'Portsmouth','stoke-on-trent':'Stoke-on-Trent',
          'derby':'Derby','leicester':'Leicester',
          'nottingham':'Nottingham','peterborough':'Peterborough',
          'cardiff':'Cardiff','swansea':'Swansea','belfast':'Belfast'
        };
        var name = CITY_NAMES[slug] || slugName(slug);
        var csuffix = ' | ' + BRAND;
        var cfull = 'Flood risk in ' + name + ' \u2013 heat, air & subsidence' + csuffix;
        var cshort = 'Flood risk in ' + name + ' \u2013 climate checks' + csuffix;
        var cmin = 'Flood risk in ' + name + csuffix;
        var ctitle = cfull.length <= 60 ? cfull : cshort.length <= 60 ? cshort : cmin;

        meta = {
          title: ctitle,
          desc: 'How does ' + name + ' compare? Flood, heat, air and subsidence stats for every postcode \u2014 plus council-wide data most checkers miss.',
          canonical: SITE + '/council/' + slug,
          robots: ROBOTS
        };

        // BreadcrumbList handled server-side by seo-inject.ts for bots/Googlebot.
        // Cleared here to prevent duplicate schema when Googlebot executes this script.
        jsonLd = [];

        previewHtml =
          '<div id="ep-c" style="position:absolute;left:-9999px;top:-9999px;max-width:700px;padding:48px 24px;font-family:system-ui,sans-serif;color:#1a1a2e;transition:opacity .3s" aria-hidden="true">' +
          '<p style="font-size:14px;color:#6b7280;margin:0 0 4px">Local climate risks for</p>' +
          '<p style="font-size:28px;margin:0 0 16px">' + esc(name) + '</p>' +
          '<p style="font-size:16px;line-height:1.6;color:#374151">' +
          'Flood, heat, air quality and subsidence overview for ' + esc(name) +
          '. This profile covers flood zones from the Environment Agency, heat projections from the Met Office, ' +
          'air quality data from Defra, and ground stability from the British Geological Survey.</p>' +
          '<p style="font-size:14px;color:#9ca3af;margin-top:16px">Loading full area profile\u2026</p>' +
          '</div>';

      } else if ((function(){ var m = path.match(/^\/top-tens\/([a-z0-9-]+)\/?$/i); if (!m) return false;
        var TOP_TENS = {
          'most-sunshine':     { title: 'Most Sunshine in the UK \u2014 20 Sunniest Local Authority Areas', desc: 'Which UK areas get the most sunshine? 20 local authority areas ranked by observed sunshine days, 2023\u20132025. Based on Open-Meteo daily archive data.', h1: 'Most Sunshine' },
          'driest':            { title: 'Driest Places to Live in the UK \u2014 20 Areas with Fewest Heavy Rain Days', desc: 'Which UK areas have the least rainfall? 20 local authority areas ranked by fewest heavy rain days, 2023\u20132025. Based on Open-Meteo daily archive data.', h1: 'Driest Conditions' },
          'mildest-winters':   { title: 'Mildest Winters in the UK \u2014 20 Areas with Fewest Cold Spells', desc: 'Which UK areas have the mildest winters? 20 local authority areas ranked by fewest cold spells, 2023\u20132025. Based on Open-Meteo daily archive data.', h1: 'Mildest Winters' },
          'flood-risk':        { title: '20 UK Councils with Highest Flood Exposure', desc: 'Which UK councils have the highest flood exposure? 20 local authorities ranked by Environment Agency flood screening data. See how your area compares.', h1: 'Highest Flood Exposure' },
          'air-quality':       { title: '20 UK Councils with Worst Air Quality', desc: 'Which UK councils have the worst air pollution? 20 local authorities ranked by PM2.5 fine particle concentrations. DEFRA UK-AIR monitoring data.', h1: 'Worst Air Quality' },
          'heat-risk':         { title: '20 UK Councils with Highest Heat Risk', desc: 'Which UK councils face the highest heat risk? 20 local authorities ranked by projected hot days using UKCP18 climate projections.', h1: 'Highest Heat Risk' },
          'most-exposed':      { title: '20 UK Councils Most Exposed to Climate Risk', desc: 'Which UK councils face the most climate risk? 20 local authorities ranked across flood, air quality, heat and subsidence. Multi-hazard climate screening.', h1: 'Most Exposed to Climate Risk' },
          'green-space':       { title: 'Greenest and Least Green Councils in England \u2014 Green Space Rankings', desc: 'Which English councils have the best access to green space? Rankings based on ONS data measuring the percentage of addresses within 200m of publicly accessible green space.', h1: 'Green Space Access Rankings' }
        };
        var slug = m[1].toLowerCase(); var cfg = TOP_TENS[slug]; if (!cfg) return false;
        meta = { title: cfg.title, desc: cfg.desc, canonical: SITE + '/top-tens/' + slug, robots: ROBOTS };
        jsonLd = [{ '@context': 'https://schema.org', '@type': 'BreadcrumbList', 'itemListElement': [
          { '@type': 'ListItem', 'position': 1, 'name': 'Home', 'item': SITE + '/' },
          { '@type': 'ListItem', 'position': 2, 'name': 'Climate Rankings', 'item': SITE + '/top-tens' },
          { '@type': 'ListItem', 'position': 3, 'name': cfg.h1, 'item': SITE + '/top-tens/' + slug }
        ]}];
        return true; })()) {
        // top-tens sub-page matched above
      } else if ((function(){ var im = path.match(/^\/insights\/([a-z0-9-]+)\/?$/i); if (!im) return false;
        var islug = im[1].toLowerCase();
        var iname = slugName(islug);
        meta = {
          title: iname + ' \u2013 Climate Risk Insight | ' + BRAND,
          desc: 'In-depth climate risk analysis for ' + iname + '. Flood exposure, heat stress, air quality and ground stability data from official UK sources.',
          canonical: SITE + '/insights/' + islug,
          robots: ROBOTS,
          ogType: 'article'
        };
        // BreadcrumbList + NewsArticle schema handled server-side by seo-inject.ts for bots.
        // Cleared here to prevent duplicate schema when Googlebot executes this script.
        jsonLd = [];
        return true; })()) {
        // insights article matched above
      } else if (path === '/compare' && search) {
        meta = {
          title: STATIC['/compare'].title,
          desc: STATIC['/compare'].desc,
          canonical: SITE + '/compare',
          robots: 'noindex, follow'
        };

      } else if (path === '/local-areas') {
        meta = STATIC['/local-areas'];
        jsonLd = [{ '@context': 'https://schema.org', '@type': 'BreadcrumbList', 'itemListElement': [
          { '@type': 'ListItem', 'position': 1, 'name': 'Home', 'item': SITE + '/' },
          { '@type': 'ListItem', 'position': 2, 'name': 'Local Areas', 'item': SITE + '/local-areas' }
        ]}];
        previewHtml =
          '<div id="ep-la" style="position:absolute;left:-9999px;top:-9999px;max-width:700px;padding:48px 24px;font-family:system-ui,sans-serif;color:#1a1a2e;transition:opacity .3s" aria-hidden="true">' +
          '<p style="font-size:28px;margin:0 0 16px">UK Local Areas</p>' +
          '<p style="font-size:16px;line-height:1.6;color:#374151">' +
          'Climate risk summaries for every local authority across the United Kingdom. ' +
          'Browse council profiles covering flood zones (Environment Agency), heat projections (Met Office UKCP18), ' +
          'air quality PM2.5 concentrations (DEFRA), and ground stability data (British Geological Survey).</p>' +
          '<p style="font-size:15px;line-height:1.6;color:#374151;margin-top:12px">' +
          'Select a council to see its full climate risk profile, including postcode-level screening and comparison tools. ' +
          'Councils are grouped by region: England, Scotland, Wales and Northern Ireland.</p>' +
          '<p style="font-size:14px;color:#9ca3af;margin-top:16px">Loading council directory\u2026</p>' +
          '</div>';

      } else if (path === '/top-tens') {
        meta = STATIC['/top-tens'];
        jsonLd = [{ '@context': 'https://schema.org', '@type': 'BreadcrumbList', 'itemListElement': [
          { '@type': 'ListItem', 'position': 1, 'name': 'Home', 'item': SITE + '/' },
          { '@type': 'ListItem', 'position': 2, 'name': 'Climate Rankings', 'item': SITE + '/top-tens' }
        ]}];
        previewHtml =
          '<div id="ep-tt" style="position:absolute;left:-9999px;top:-9999px;max-width:700px;padding:48px 24px;font-family:system-ui,sans-serif;color:#1a1a2e;transition:opacity .3s" aria-hidden="true">' +
          '<p style="font-size:28px;margin:0 0 16px">UK Climate Risk Rankings</p>' +
          '<p style="font-size:16px;line-height:1.6;color:#374151">' +
          'Top 20 UK local authority areas ranked across seven climate categories: most sunshine, driest conditions, ' +
          'mildest winters, highest flood exposure, worst air quality, highest heat risk and most overall climate exposure. ' +
          'Based on three years of observations and national screening data from the Environment Agency, DEFRA, Met Office and BGS.</p>' +
          '<p style="font-size:14px;color:#9ca3af;margin-top:16px">Loading rankings\u2026</p>' +
          '</div>';

      } else if (path === '/browse') {
        meta = STATIC['/browse'];
        jsonLd = [{ '@context': 'https://schema.org', '@type': 'BreadcrumbList', 'itemListElement': [
          { '@type': 'ListItem', 'position': 1, 'name': 'Home', 'item': SITE + '/' },
          { '@type': 'ListItem', 'position': 2, 'name': 'Browse Postcodes', 'item': SITE + '/browse' }
        ]}];
        previewHtml =
          '<div id="ep-br" style="position:absolute;left:-9999px;top:-9999px;max-width:700px;padding:48px 24px;font-family:system-ui,sans-serif;color:#1a1a2e;transition:opacity .3s" aria-hidden="true">' +
          '<p style="font-size:28px;margin:0 0 16px">Browse All UK Postcodes</p>' +
          '<p style="font-size:16px;line-height:1.6;color:#374151">' +
          'Browse climate risk data for every UK postcode. Search by area or postcode prefix to find flood zones, ' +
          'heat projections, air quality readings and ground stability assessments for any location.</p>' +
          '<p style="font-size:14px;color:#9ca3af;margin-top:16px">Loading postcode browser\u2026</p>' +
          '</div>';

      } else if (STATIC[path]) {
        meta = STATIC[path];
      } else {
        meta = { robots: 'noindex, nofollow' };
      }

      // Apply meta tags to DOM
      if (!meta) return;

      function setMeta(attr, attrVal, content) {
        var el = document.querySelector('meta[' + attr + '="' + attrVal + '"]');
        if (el) { el.setAttribute('content', content); }
        else {
          el = document.createElement('meta');
          el.setAttribute(attr, attrVal);
          el.setAttribute('content', content);
          document.head.appendChild(el);
        }
      }

      function setLink(rel, href) {
        var el = document.querySelector('link[rel="' + rel + '"]');
        if (el) { el.setAttribute('href', href); }
        else {
          el = document.createElement('link');
          el.setAttribute('rel', rel);
          el.setAttribute('href', href);
          document.head.appendChild(el);
        }
      }

      if (meta.title) {
        document.title = meta.title;
        setMeta('property', 'og:title', meta.title);
        setMeta('name', 'twitter:title', meta.title);
      }
      if (meta.desc) {
        setMeta('name', 'description', meta.desc);
        setMeta('property', 'og:description', meta.desc);
        setMeta('name', 'twitter:description', meta.desc);
      }
      if (meta.canonical) {
        setLink('canonical', meta.canonical);
        setMeta('property', 'og:url', meta.canonical);
      }
      if (meta.robots) {
        setMeta('name', 'robots', meta.robots);
      }
      if (meta.ogType) {
        setMeta('property', 'og:type', meta.ogType);
      }
      if (meta.ogImage) {
        setMeta('property', 'og:image', meta.ogImage);
        setMeta('name', 'twitter:image', meta.ogImage);
        setMeta('name', 'twitter:card', 'summary_large_image');
      }

      // Inject JSON-LD
      if (jsonLd) {
        for (var i = 0; i < jsonLd.length; i++) {
          var s = document.createElement('script');
          s.type = 'application/ld+json';
          s.textContent = JSON.stringify(jsonLd[i]);
          document.head.appendChild(s);
        }
      }

      // Inject visible content overlay
      if (previewHtml) {
        function injectPreview() {
          var root = document.getElementById('root');
          if (!root) return;
          var div = document.createElement('div');
          div.innerHTML = previewHtml;
          root.parentNode.insertBefore(div.firstChild, root);

          var ep = document.getElementById('ep') || document.getElementById('ep-c') || document.getElementById('ep-tt') || document.getElementById('ep-la') || document.getElementById('ep-br');
          if (!ep) return;
          function hide() {
            ep.style.opacity = '0';
            ep.style.pointerEvents = 'none';
            setTimeout(function () { ep.style.display = 'none'; }, 350);
          }
          var obs = new MutationObserver(function () {
            if (root.querySelector('main')) { hide(); obs.disconnect(); }
          });
          obs.observe(root, { childList: true, subtree: true });
          setTimeout(hide, 8000);
        }

        if (document.readyState === 'loading') {
          document.addEventListener('DOMContentLoaded', injectPreview);
        } else {
          injectPreview();
        }
      }
    })();
    </script>
    <!-- Early prefetch for /postcode/* pages (organic landing from Google).
         Fires climate-risk + geocode before the JS bundle loads so responses
         are in the browser HTTP cache when React mounts. -->
    <script>
      (function() {
        var m = /^\/postcode\/([A-Za-z0-9]{3,8})\/?$/i.exec(location.pathname);
        if (!m) return;
        var pc = m[1].toUpperCase();
        var base = 'https://llfzjghbyrhabfmvmiff.supabase.co';
        var key = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImxsZnpqZ2hieXJoYWJmbXZtaWZmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTU3ODczMDgsImV4cCI6MjA3MTM2MzMwOH0.IO4KX3zWOvqzbzgEtH1jVbVTGm2NPNyqTbqBrJS0kxc';
        fetch(base + '/functions/v1/climate-risk?postcode=' + pc, {
          headers: { 'Authorization': 'Bearer ' + key, 'apikey': key }
        }).catch(function(){});
        fetch('https://api.postcodes.io/postcodes/' + pc).catch(function(){});
      })();
    </script>
  </body>
</html>
