/* AreaIQ Places design system
 *
 * One stylesheet for the whole Places product. The council explorer uses it
 * now; generate-postcode-pages.js adopts it in Phase 3, which is why the
 * palette lives here rather than inline in a generator. Two copies of a
 * palette is two palettes.
 *
 * Direction per brief: dark navy, white, electric blue, light blue, silver.
 * Related to areaiq.org but clearly its own product. Institutional and
 * trustworthy without looking like a government website, dense without
 * looking like a SaaS dashboard.
 */

:root {
  /* Ground. Navy, not black. The B2B product owns black. */
  --bg:        #0a1020;
  --bg-raised: #101a30;
  --bg-sunken: #070c18;

  /* Electric blue carries action and selection. Light blue carries
   * secondary emphasis. Silver carries structure. */
  --blue:        #2f6bff;
  --blue-bright: #4d84ff;
  --blue-dim:    rgba(47,107,255,0.12);
  --blue-border: rgba(47,107,255,0.32);
  --blue-light:  #7fb4ff;

  --silver:        #c3ccd9;
  --silver-dim:    rgba(195,204,217,0.08);

  --text:  #f2f5fa;
  --muted: #93a0b4;
  --light: #d4dbe6;

  --card:        rgba(255,255,255,0.04);
  --card-border: rgba(195,204,217,0.14);
  --card-hover:  rgba(255,255,255,0.07);

  /* Reserved for provenance and warnings, never for decoration. */
  --amber:     #f0a828;
  --amber-dim: rgba(240,168,40,0.12);

  --radius:    14px;
  --radius-sm: 9px;
  --maxw:      1080px;
}

* { box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,16,32,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  padding: 0 24px;
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; height: 60px;
  display: flex; align-items: center; gap: 20px;
}
.logo {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 20px; color: var(--blue-light); letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo span { color: var(--text); }
.nav-links { display: flex; gap: 18px; margin-left: auto; font-size: 14px; }
.nav-links a { color: var(--muted); transition: color .15s; }
.nav-links a:hover, .nav-links a.on { color: var(--text); }
.nav-cross { color: var(--blue-light) !important; }

/* Layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 40px 0; }
.section-sm { padding: 24px 0; }

.eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin-bottom: 8px;
}

.lede { color: var(--light); font-size: 17px; max-width: 60ch; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
}
.card-link { transition: background .15s, border-color .15s, transform .15s; }
.card-link:hover {
  background: var(--card-hover);
  border-color: var(--blue-border);
  transform: translateY(-1px);
}

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* The governance cards: the signature feature. Each one is a body plus what
 * it is responsible for, so the relationship reads at a glance. */
.gov-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.gov-card.is-strategic { border-left-color: var(--blue-light); }
.gov-card.is-police,
.gov-card.is-fire,
.gov-card.is-health { border-left-color: var(--silver); }

.gov-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 17px; }
.gov-type {
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); margin-top: 2px;
}
.gov-duties {
  list-style: none; padding: 0; margin: 12px 0 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.gov-duties li {
  font-size: 12.5px; color: var(--light);
  background: var(--silver-dim);
  border: 1px solid var(--card-border);
  border-radius: 999px; padding: 3px 10px;
}
.gov-link {
  display: inline-block; margin-top: 12px;
  font-size: 13px; color: var(--blue-light);
}
.gov-link:hover { text-decoration: underline; }

/* Hierarchy: the chain from country down to ward. */
.hierarchy { list-style: none; padding: 0; margin: 0; }
.hierarchy li {
  position: relative; padding: 9px 0 9px 22px;
  border-left: 1px solid var(--card-border);
}
.hierarchy li:last-child { border-left-color: transparent; }
.hierarchy li::before {
  content: ''; position: absolute; left: -4.5px; top: 17px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 0 3px var(--bg);
}
.hierarchy .h-type {
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
}
.hierarchy .h-name { font-size: 16px; font-weight: 600; }
.hierarchy .h-name a:hover { color: var(--blue-light); }

/* Share badge. Shown whenever an area does not cover the whole sector, so a
 * partial answer can never be mistaken for a whole one. */
.share {
  display: inline-block; margin-left: 8px;
  font-size: 11px; font-weight: 600;
  color: var(--amber); background: var(--amber-dim);
  border: 1px solid rgba(240,168,40,0.28);
  border-radius: 999px; padding: 1px 8px;
  vertical-align: middle;
}

/* Provenance and honesty notices. Deliberately plain. */
.note {
  font-size: 13px; color: var(--muted);
  background: var(--bg-sunken);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.note strong { color: var(--light); font-weight: 600; }

.sources { font-size: 12.5px; color: var(--muted); }
.sources a { color: var(--blue-light); }
.sources a:hover { text-decoration: underline; }

/* Search */
.search { display: flex; gap: 10px; flex-wrap: wrap; }
.search input {
  flex: 1 1 260px; min-width: 0;
  background: var(--bg-sunken);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 16px; font-family: inherit;
  padding: 12px 14px;
}
.search input:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim);
}
.search input::placeholder { color: var(--muted); }

.btn {
  background: var(--blue); color: #fff;
  border: 1px solid var(--blue); border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; font-family: inherit;
  padding: 12px 20px; cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--blue-bright); }
.btn-quiet {
  background: transparent; color: var(--light);
  border-color: var(--card-border);
}
.btn-quiet:hover { background: var(--card-hover); }

/* Council index */
.az { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 24px; }
.az a {
  font-size: 13px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--card-border); border-radius: var(--radius-sm);
  padding: 5px 11px; transition: all .15s;
}
.az a:hover { color: var(--text); border-color: var(--blue-border); background: var(--blue-dim); }

.council-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.council-list a {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); padding: 11px 14px;
  transition: background .15s, border-color .15s;
}
.council-list a:hover { background: var(--card-hover); border-color: var(--blue-border); }
.council-list .c-name { font-weight: 600; }
.council-list .c-type { font-size: 12px; color: var(--muted); }

.stat-row { display: flex; flex-wrap: wrap; gap: 26px; }
.stat .s-val { font-family: 'Space Grotesk', sans-serif; font-size: 25px; font-weight: 700; }
.stat .s-lab { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* Footer */
.foot {
  border-top: 1px solid var(--card-border);
  margin-top: 48px; padding: 28px 0 40px;
  font-size: 13px; color: var(--muted);
}
.foot a { color: var(--light); }
.foot a:hover { color: var(--blue-light); }

/* Mobile first means this is the check that matters, not an afterthought. */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav { padding: 0 16px; }
  .nav-inner { height: 54px; gap: 12px; }
  .nav-links { gap: 13px; font-size: 13px; }
  .section { padding: 28px 0; }
  .lede { font-size: 16px; }
  .stat-row { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .card-link:hover { transform: none; }
}

/* ==========================================================================
 * Added 5 September 2026 for the Places sprint: nav search and autocomplete,
 * the sector page (A to D sections), maps, homepage, area pages and compare.
 * Same tokens, same rules: blue carries action, silver carries structure,
 * amber is provenance and warnings only. No colour ever passes judgement on
 * a place, so there is no green-good / red-bad pair anywhere below.
 * ========================================================================== */

/* Nav search */
.nav-search { flex: 1; max-width: 440px; position: relative; }
.nav-search input {
  width: 100%; background: var(--bg-sunken);
  border: 1px solid var(--card-border); border-radius: 999px;
  padding: 8px 14px 8px 36px; font: inherit; font-size: 14px; color: var(--text);
}
.nav-search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim); }
.nav-search input::placeholder { color: var(--muted); }
.nav-search .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
@media (max-width: 760px) {
  .nav-inner.has-search .nav-links { display: none; }
  .nav-search { max-width: none; }
}

/* Autocomplete */
.ac {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 400;
  background: var(--bg-raised); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  overflow: hidden; text-align: left;
}
.ac-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 14px; border-top: 1px solid var(--card-border); }
.ac-item:first-child { border-top: none; }
.ac-item:hover, .ac-item.on { background: var(--blue-dim); }
.ac-name { font-weight: 600; font-size: 14px; color: var(--text); }
.ac-type { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-light); white-space: nowrap; align-self: center; }
.ac-ctx { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.ac-none { padding: 12px 14px; font-size: 13px; color: var(--muted); }

/* Sector page hero */
.crumb { font-size: 13px; color: var(--muted); }
.crumb a:hover { color: var(--blue-light); }
.hero { padding: 34px 0 26px; border-bottom: 1px solid var(--card-border); }
.hero-code { font-family: 'Space Grotesk', sans-serif; font-size: clamp(34px, 6vw, 56px); font-weight: 700; line-height: 1; letter-spacing: -0.03em; margin-top: 12px; }
.hero-line { font-size: 16px; color: var(--light); margin-top: 8px; }
.hero-line a { color: var(--blue-light); }
.hero-line a:hover { text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { font-size: 13px; color: var(--light); background: var(--card); border: 1px solid var(--card-border); border-radius: 999px; padding: 6px 13px; }
.chip b { color: var(--text); font-weight: 600; }

/* Sections A to D */
.sec { padding: 34px 0 4px; }
.sec-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--card-border); }
.sec-head .k { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--blue-light); font-size: 14px; }
.sec-head h2 { font-size: 22px; }
.sec-head .q { font-size: 13px; color: var(--muted); margin-left: auto; }
@media (max-width: 640px) { .sec-head .q { margin-left: 0; width: 100%; } .sec-head h2 { font-size: 20px; } }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.fact { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 12px 14px; }
.fact .f-lab { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.fact .f-val { font-size: 16px; font-weight: 600; margin-top: 3px; line-height: 1.3; }
.fact .f-val a:hover { color: var(--blue-light); }
.fact .f-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* Data cards */
.card h3 { font-size: 16px; margin: 0 0 10px; }
.card .lead { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.data-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(195,204,217,0.08); }
.data-row:last-child { border-bottom: none; }
.row-label { font-size: 14.5px; color: var(--light); flex: 1; }
.row-sub { display: block; font-size: 12px; color: var(--muted); }
.row-num { font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.na { color: var(--muted); font-style: italic; font-size: 13px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--silver-dim); border: 1px solid var(--card-border); color: var(--light); }
.badge-blue { background: var(--blue-dim); border-color: var(--blue-border); color: var(--blue-light); }
.badge-na { color: var(--muted); font-weight: 500; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-block { background: var(--bg-sunken); border-radius: var(--radius-sm); padding: 12px 14px; }
.stat-val { font-family: 'Space Grotesk', sans-serif; font-size: 21px; font-weight: 700; }
.stat-lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }
.mini-bar-wrap { flex: 1; max-width: 90px; height: 5px; background: var(--silver-dim); border-radius: 999px; }
.mini-bar { height: 100%; border-radius: 999px; background: var(--blue); }
.src { font-size: 12px; color: var(--muted); margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--card-border); line-height: 1.5; }
.src a { color: var(--blue-light); }
.src a:hover { text-decoration: underline; }
.ext { font-size: 13px; color: var(--blue-light); display: inline-block; margin-top: 8px; }
.ext:hover { text-decoration: underline; }

/* Business panel */
.biz { margin-top: 18px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); }
.biz summary { cursor: pointer; padding: 16px 20px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; font-size: 16px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.biz summary::-webkit-details-marker { display: none; }
.biz summary::after { content: '+'; color: var(--blue-light); font-size: 22px; line-height: 1; }
.biz[open] summary::after { content: '\2212'; }
.biz .biz-body { padding: 0 20px 18px; font-size: 14px; color: var(--light); }
.biz .biz-body ul { margin: 10px 0 0; padding-left: 18px; line-height: 1.75; }
.biz .biz-body li b { color: var(--text); }

/* Share, related, notices, lists */
.share-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 18px 0; font-size: 13px; color: var(--muted); }
.share-row a, .share-row button { font: inherit; font-size: 12.5px; color: var(--light); background: var(--card); border: 1px solid var(--card-border); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.share-row a:hover, .share-row button:hover { border-color: var(--blue-border); }
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.related a { display: block; }
.related .r-t { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 14px; }
.related .r-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.notice { font-size: 13px; color: var(--muted); background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 12px 14px; line-height: 1.55; }
.notice strong { color: var(--text); }
.skel { height: 56px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-sm); animation: pulse 1.5s ease infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.list-links { display: flex; flex-direction: column; gap: 8px; }
.list-links a { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 10px 12px; transition: border-color .15s; }
.list-links a:hover { border-color: var(--blue-border); }
.list-links .l-t { font-size: 13.5px; font-weight: 600; }
.list-links .l-s { font-size: 12px; color: var(--muted); }

/* Maps. The container is fixed height; Leaflet is initialised only when the
 * box scrolls into view, so a page never pays for a map nobody looked at. */
.map-box { position: relative; height: 420px; border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; background: var(--bg-sunken); }
.map-box .leaflet-container { height: 100%; width: 100%; background: var(--bg-sunken); font-family: inherit; }
.map-box.is-home { height: min(70vh, 640px); }
@media (max-width: 640px) { .map-box { height: 300px; } .map-box.is-home { height: 380px; } }
.map-load { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; background: radial-gradient(ellipse at 50% 30%, var(--bg-raised), var(--bg-sunken)); color: var(--muted); font-size: 14px; }
.layer-control { position: absolute; top: 12px; right: 12px; z-index: 500; background: rgba(10,16,32,0.92); backdrop-filter: blur(12px); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 8px; display: flex; flex-direction: column; gap: 3px; min-width: 160px; }
.layer-control .lc-title { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 2px 6px 4px; }
.layer-btn { font: inherit; font-size: 13px; text-align: left; color: var(--light); background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 6px 8px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.layer-btn .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--silver); flex-shrink: 0; }
.layer-btn.on { background: var(--blue-dim); border-color: var(--blue-border); color: var(--text); }
.layer-btn .n { margin-left: auto; font-size: 11px; color: var(--muted); }
@media (max-width: 640px) {
  .layer-control { top: auto; bottom: 10px; left: 10px; right: 10px; flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .layer-control .lc-title, .layer-btn .n { display: none; }
  .layer-btn { font-size: 12px; padding: 5px 8px; }
}
.map-panel { position: absolute; left: 12px; top: 12px; z-index: 500; background: rgba(10,16,32,0.94); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 12px 14px; max-width: 300px; font-size: 13px; }
.map-panel .mp-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px; }
.map-panel .mp-type { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.map-panel a { color: var(--blue-light); }
@media (max-width: 640px) { .map-panel { left: 10px; right: 10px; max-width: none; } }
.leaflet-control-attribution { background: rgba(10,16,32,0.8) !important; color: var(--muted) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--blue-light) !important; }
.leaflet-control-zoom a { background: rgba(10,16,32,0.9) !important; color: var(--text) !important; border-color: var(--card-border) !important; }
.leaflet-tooltip.aiq-tip { background: var(--bg-raised); color: var(--text); border: 1px solid var(--card-border); font-size: 12px; box-shadow: none; }
.leaflet-tooltip.aiq-tip::before { border-top-color: var(--card-border); }
.leaflet-popup-content-wrapper { background: var(--bg-raised); color: var(--text); border: 1px solid var(--card-border); border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.leaflet-popup-tip { background: var(--bg-raised); }
.leaflet-popup-content { font-family: inherit; font-size: 13px; }
.leaflet-popup-content a { color: var(--blue-light); }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }

/* Homepage */
.home-hero { padding: 56px 0 36px; text-align: center; }
.home-hero h1 { font-size: clamp(32px, 6vw, 54px); letter-spacing: -0.03em; max-width: 16ch; margin: 0 auto; }
.home-hero .lede { margin: 16px auto 0; text-align: center; }
.home-hero .search { max-width: 640px; margin: 26px auto 0; position: relative; }
.home-hero .search input { border-radius: 999px; padding: 14px 20px; font-size: 16px; }
.cta-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.trust { font-size: 13px; color: var(--muted); margin-top: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tile { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 18px 20px; }
.tile .t-k { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px; }
.tile .t-s { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.tile.is-link { transition: border-color .15s, background .15s; }
.tile.is-link:hover { border-color: var(--blue-border); background: var(--card-hover); }
.two-col { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* Tables (area pages) */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--card-border); font-weight: 600; white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid rgba(195,204,217,0.08); vertical-align: top; }
.tbl tr:hover td { background: var(--card); }
.tbl a { color: var(--blue-light); }
.pcode { font-family: 'Space Grotesk', sans-serif; font-weight: 700; }

/* Long-form pages */
.foot-links { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.foot-links a { color: var(--light); font-size: 13px; }
.prose p { color: var(--light); font-size: 15px; line-height: 1.7; margin: 0 0 14px; }
.prose h2 { font-size: 20px; margin: 30px 0 10px; }
.prose h3 { font-size: 16px; margin: 20px 0 8px; }
.prose ul, .prose ol { color: var(--light); font-size: 15px; line-height: 1.7; margin: 0 0 14px; padding-left: 20px; }
.prose a { color: var(--blue-light); }
.prose a:hover { text-decoration: underline; }
.prose .tbl td, .prose .tbl th { font-size: 13.5px; }

/* Compare */
.compare-form { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; }
.compare-form label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.compare-form .field { position: relative; }
.compare-form input { width: 100%; background: var(--bg-sunken); border: 1px solid var(--card-border); border-radius: var(--radius-sm); color: var(--text); font: inherit; font-size: 16px; padding: 12px 14px; }
.compare-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim); }
.vs { text-align: center; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding-bottom: 14px; }
@media (max-width: 640px) { .compare-form { grid-template-columns: 1fr; } .vs { display: none; } }
.cmp-grid { display: grid; grid-template-columns: 1fr 150px 1fr; }
.cmp-grid > div { padding: 11px 12px; border-bottom: 1px solid rgba(195,204,217,0.08); font-size: 14px; }
.cmp-grid .c-lab { text-align: center; color: var(--muted); font-size: 12px; align-self: center; }
.cmp-grid .c-l { text-align: right; font-weight: 600; }
.cmp-grid .c-r { text-align: left; font-weight: 600; }
.cmp-grid .c-sec { grid-column: 1 / -1; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--blue-light); padding-top: 20px; border-bottom: none; }
@media (max-width: 640px) { .cmp-grid { grid-template-columns: 1fr 96px 1fr; } .cmp-grid > div { font-size: 13px; padding: 9px 8px; } }

/* Marker clusters on the homepage map. Structure comes from MarkerCluster.css;
 * this is the only colouring, so the default green/yellow/orange never loads. */
.aiq-cluster { background: rgba(47,107,255,0.85); border: 2px solid rgba(255,255,255,0.85); border-radius: 50%; color: #fff; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,0.35); }
.aiq-cluster.is-silver { background: rgba(195,204,217,0.85); color: #0a1020; }
.aiq-pin { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.9); box-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.map-note { position: absolute; left: 12px; bottom: 12px; z-index: 500; font-size: 11px; color: var(--muted); background: rgba(10,16,32,0.8); padding: 4px 8px; border-radius: 6px; }
@media (max-width: 640px) { .map-note { display: none; } }

/* Ranking tables. The rank cell is a position in a list, never a grade, so it
 * stays muted and narrow rather than being emphasised. */
.tbl .rank { width: 44px; color: var(--muted); font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
