/*
Theme Name: World Power Plants
Theme URI: https://worldpowerplants.com
Author: World Power Plants Team
Description: World Power Plants — global energy database theme. Faithful WordPress port of the production Next.js design (shadcn/ui neutral system, Tailwind v4 tokens). Multisite-ready, light/dark, fully responsive.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: worldpowerplants
*/

/* ============================================================
   DESIGN TOKENS — copied verbatim from the live site's globals.css
   (shadcn/ui "neutral" palette, oklch). Modern browsers render oklch
   natively, so colours are pixel-identical to production.
   ============================================================ */
:root {
  --radius: 0.625rem;
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.205 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);

  /* radius scale (mirrors @theme inline) */
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);

  /* lucide accent colours (Tailwind palette) */
  --blue-500: #3b82f6;   --blue-600: #2563eb;
  --yellow-500: #eab308; --green-500: #22c55e;
  --purple-500: #a855f7; --cyan-500: #06b6d4;
  --red-500: #ef4444;    --orange-500: #f97316;
  --amber-500: #f59e0b;

  /* fuel-type colours (verbatim from the live site's types/plant.ts) */
  --fuel-solar: #FFD700; --fuel-wind: #87CEEB; --fuel-hydro: #1E90FF;
  --fuel-nuclear: #9932CC; --fuel-coal: #2F4F4F; --fuel-gas: #FF8C00;
  --fuel-oil: #8B4513; --fuel-biomass: #228B22; --fuel-geothermal: #DC143C;
  --fuel-other: #808080;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.205 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.205 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.922 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.704 0.191 22.216);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.556 0 0);
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Layout primitives */
.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-inline: 2rem; } }
.site-main { flex: 1 1 auto; }
.py-8 { padding-block: 2rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-4 > * + * { margin-top: 1rem; }

.lucide { width: 1rem; height: 1rem; stroke-width: 2; }

/* accent helper — colored lucide icons + soft bg (matches text-*-500 / bg-*-500/10) */
.acc-blue { --acc: var(--blue-500); } .acc-blue600 { --acc: var(--blue-600); }
.acc-yellow { --acc: var(--yellow-500); } .acc-green { --acc: var(--green-500); }
.acc-purple { --acc: var(--purple-500); } .acc-cyan { --acc: var(--cyan-500); }
.acc-red { --acc: var(--red-500); } .acc-orange { --acc: var(--orange-500); }
.ic-acc { color: var(--acc); }
.ic-acc-bg { background: color-mix(in oklab, var(--acc) 12%, transparent); color: var(--acc); }

/* ============================================================
   BUTTONS (shadcn/ui Button)
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  white-space: nowrap; border-radius: var(--radius-md); font-size: 0.875rem;
  font-weight: 500; height: 2.25rem; padding-inline: 1rem; border: 1px solid transparent;
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s;
  user-select: none;
}
.btn svg { width: 1rem; height: 1rem; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: color-mix(in oklab, var(--primary) 90%, transparent); }
.btn-outline { border-color: var(--border); background: var(--background); }
.btn-outline:hover { background: var(--accent); color: var(--accent-foreground); }
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn-secondary:hover { background: color-mix(in oklab, var(--secondary) 80%, transparent); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--accent); color: var(--accent-foreground); }
.btn-sm { height: 2rem; padding-inline: 0.75rem; font-size: 0.8125rem; }
.btn-lg { height: 2.75rem; padding-inline: 1.5rem; font-size: 1rem; }
.btn-icon { width: 2rem; height: 2rem; padding: 0; }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem; border-radius: 999px;
  padding: 0.15rem 0.55rem; font-size: 0.75rem; font-weight: 500; line-height: 1.1;
  border: 1px solid transparent;
}
/* fuel-typed badge (inline colour via --fc, 12% bg like the live site) */
.badge-fuel { background: color-mix(in oklab, var(--fc) 15%, transparent); border-color: color-mix(in oklab, var(--fc) 45%, transparent); color: color-mix(in oklab, var(--fc) 72%, var(--foreground)); }
.badge-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.badge-outline { border-color: var(--border); color: var(--foreground); }

/* ============================================================
   CARD (shadcn/ui Card)
   ============================================================ */
.card {
  background: var(--card); color: var(--card-foreground);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.card-body { padding: 1.5rem; }
.card-body-sm { padding: 1rem; }
.card-title { font-size: 0.875rem; font-weight: 500; }
.card-hover { transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-hover:hover { border-color: color-mix(in oklab, var(--primary) 50%, var(--border)); box-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.10); }

/* ============================================================
   HEADER
   ============================================================ */
.wpp-header {
  position: sticky; top: 0; z-index: 50; width: 100%;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--background) 80%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
}
.wpp-header-inner { display: flex; height: 4rem; align-items: center; padding-inline: 0.75rem; gap: 0.25rem; }
@media (min-width: 1024px) { .wpp-header-inner { padding-inline: 1rem; } }
.wpp-logo { display: flex; align-items: center; gap: 0.375rem; flex-shrink: 0; margin-right: 0.5rem; font-weight: 700; }
.wpp-logo img { width: 2rem; height: 2rem; }
.wpp-logo .brand { font-size: 1rem; white-space: nowrap; }
@media (max-width: 639px) { .wpp-logo .brand { font-size: 0.8125rem; } }

.wpp-nav { display: none; align-items: center; flex: 1 1 0%; min-width: 0; }
@media (min-width: 1024px) { .wpp-nav { display: flex; } }
.wpp-nav a, .wpp-nav .navbtn {
  padding: 0.375rem clamp(4px, 0.55vw, 12px); font-size: clamp(11px, 0.85vw, 14px);
  font-weight: 500; border-radius: var(--radius-md); white-space: nowrap;
  color: var(--muted-foreground); transition: background-color .15s, color .15s;
  background: transparent; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 0.25rem;
}
.wpp-nav a:hover, .wpp-nav .navbtn:hover { background: var(--accent); color: var(--accent-foreground); }
.wpp-nav a.active, .wpp-nav .navbtn.active { background: var(--accent); color: var(--accent-foreground); }

/* Dropdown (Tools & Stats) */
.wpp-dd { position: relative; }
.wpp-dd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 13rem;
  background: var(--popover); color: var(--popover-foreground);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: 0 10px 30px -10px rgb(0 0 0 / 0.25); padding: 0.25rem;
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .12s; z-index: 60;
}
.wpp-dd:hover .wpp-dd-menu, .wpp-dd:focus-within .wpp-dd-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.wpp-dd-menu a {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.625rem; width: 100%;
  border-radius: var(--radius-sm); font-size: 0.875rem; color: var(--popover-foreground); font-weight: 400;
}
.wpp-dd-menu a:hover { background: var(--accent); color: var(--accent-foreground); }
.wpp-dd-sep { height: 1px; background: var(--border); margin: 0.25rem 0; }

/* Right controls */
.wpp-controls { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; flex-shrink: 0; }
@media (min-width: 1024px) { .wpp-controls { gap: 0.375rem; } }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem;
  border-radius: var(--radius-md); background: transparent; border: 0; cursor: pointer; color: var(--foreground);
  transition: background-color .15s;
}
.icon-btn:hover { background: var(--accent); }
.icon-btn svg { width: 1.15rem; height: 1.15rem; }

/* language select */
.wpp-lang { position: relative; }
.wpp-lang-btn { display: inline-flex; align-items: center; gap: 0.25rem; }
.wpp-lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 9rem;
  background: var(--popover); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: 0 10px 30px -10px rgb(0 0 0 / 0.25); padding: 0.25rem;
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .12s; z-index: 60;
}
.wpp-lang:hover .wpp-lang-menu, .wpp-lang:focus-within .wpp-lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.wpp-lang-menu a { display: flex; gap: .5rem; padding: 0.45rem 0.6rem; border-radius: var(--radius-sm); font-size: 0.875rem; }
.wpp-lang-menu a:hover { background: var(--accent); }
.wpp-lang-menu a.active { font-weight: 600; }

/* dark toggle icon swap */
.dark .icon-sun { display: none; }
.icon-moon { display: none; }
.dark .icon-moon { display: block; }

/* ============================================================
   MOBILE SHEET
   ============================================================ */
.wpp-burger { display: inline-flex; }
@media (min-width: 1024px) { .wpp-burger { display: none; } }
.wpp-sheet-overlay { position: fixed; inset: 0; background: rgb(0 0 0 / 0.5); z-index: 90; opacity: 0; visibility: hidden; transition: .2s; }
.wpp-sheet-overlay.open { opacity: 1; visibility: visible; }
.wpp-sheet {
  position: fixed; top: 0; right: 0; height: 100%; width: 300px; max-width: 85vw; z-index: 100;
  background: var(--background); border-left: 1px solid var(--border); padding: 1.5rem 1.25rem;
  overflow-y: auto; transform: translateX(100%); transition: transform .25s ease;
}
.wpp-sheet.open { transform: translateX(0); }
.wpp-sheet .brand-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; font-weight: 700; font-size: 1.125rem; }
.wpp-sheet nav { display: flex; flex-direction: column; gap: 0.25rem; }
.wpp-sheet nav a { padding: 0.75rem; font-size: 0.875rem; font-weight: 500; border-radius: var(--radius-md); color: var(--muted-foreground); display: flex; align-items: center; gap: 0.5rem; }
.wpp-sheet nav a:hover { background: var(--accent); color: var(--accent-foreground); }
.wpp-sheet .grp { padding: 0.75rem 0.75rem 0.25rem; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-foreground); display: flex; align-items: center; gap: 0.375rem; }
.wpp-sheet nav a.sub { padding-left: 1.5rem; }

/* ============================================================
   HERO
   ============================================================ */
.wpp-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  background: linear-gradient(to bottom right, color-mix(in oklab, var(--primary) 10%, transparent), color-mix(in oklab, var(--primary) 5%, transparent), var(--background));
}
.wpp-hero-inner { position: relative; padding: 3rem 1.5rem; }
@media (min-width: 768px) { .wpp-hero-inner { padding: 4rem 3rem; } }
.wpp-hero-grid { display: flex; flex-direction: column; gap: 2rem; }
@media (min-width: 768px) { .wpp-hero-grid { flex-direction: row; align-items: center; justify-content: space-between; } }
.wpp-hero-copy { max-width: 42rem; display: flex; flex-direction: column; gap: 1rem; }
.wpp-hero h1 { font-size: 2.25rem; }
@media (min-width: 768px) { .wpp-hero h1 { font-size: 3rem; } }
.wpp-hero p.sub { font-size: 1.125rem; color: var(--muted-foreground); }
.wpp-hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; padding-top: 0.5rem; }
.wpp-hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; width: 100%; }
@media (min-width: 640px) { .wpp-hero-stats { gap: 1rem; } }
@media (min-width: 768px) { .wpp-hero-stats { width: auto; } }
.wpp-hero-stat {
  background: color-mix(in oklab, var(--background) 80%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 1rem; text-align: center; min-width: 0;
}
.wpp-hero-stat svg { width: 2rem; height: 2rem; margin: 0 auto 0.5rem; }
.wpp-hero-stat .num { font-size: 1.5rem; font-weight: 700; }
.wpp-hero-stat .lbl { font-size: 0.75rem; color: var(--muted-foreground); line-height: 1.1; }
@media (max-width: 639px) { .wpp-hero-stat { padding: 0.5rem; } .wpp-hero-stat .num { font-size: 1.125rem; } .wpp-hero-stat .lbl { font-size: 10px; } .wpp-hero-stat svg { width: 1.5rem; height: 1.5rem; } }

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-head h2 { font-size: 1.25rem; font-weight: 600; }
.section-sub { color: var(--muted-foreground); font-size: 0.875rem; }
.view-all { font-size: 0.875rem; color: var(--muted-foreground); display: inline-flex; align-items: center; gap: 0.25rem; }
.view-all:hover { color: var(--foreground); }

/* ============================================================
   GRIDS
   ============================================================ */
.grid { display: grid; gap: 1rem; }
.grid-stats { grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-stats { grid-template-columns: repeat(4, 1fr); } }
.grid-quick { grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 640px) { .grid-quick { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-quick { grid-template-columns: repeat(3, 1fr); } }
.grid-cards { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } }
.grid-2 { grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 1024px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

/* Stat card (dashboard StatsCards) */
.stat-card .row { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 1.5rem 0.5rem; }
.stat-card .row .card-title { color: var(--foreground); }
.stat-card .row svg { width: 1.25rem; height: 1.25rem; }
.stat-card .body { padding: 0 1.5rem 1.5rem; }
.stat-card .value { font-size: 1.5rem; font-weight: 700; }
.stat-card .desc { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.15rem; }

/* Quick link card */
.quick-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; }
.quick-ic { padding: 0.75rem; border-radius: var(--radius-xl); display: inline-flex; }
.quick-ic svg { width: 1.25rem; height: 1.25rem; }
.quick-card .txt { flex: 1; min-width: 0; }
.quick-card .txt h3 { font-size: 0.95rem; font-weight: 500; }
.quick-card:hover .txt h3 { color: var(--primary); }
.quick-card .txt p { font-size: 0.875rem; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-arrow { color: var(--muted-foreground); transition: transform .15s, color .15s; }
.card-hover:hover .quick-arrow { color: var(--primary); transform: translateX(4px); }

/* Country / plant list card */
.entity-card .top { display: flex; align-items: center; justify-content: space-between; }
.entity-card .flag { width: 28px; height: 21px; border-radius: 2px; flex-shrink: 0; }
.entity-card h3 { font-size: 0.95rem; font-weight: 600; }
.entity-card:hover h3 { color: var(--primary); }
.entity-card .meta { font-size: 0.75rem; color: var(--muted-foreground); }
.entity-card .stats-row { display: flex; align-items: center; gap: 1rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.entity-card .stats-row .kv { display: flex; align-items: center; gap: 0.375rem; }
.entity-card .stats-row svg { width: 0.875rem; height: 0.875rem; }
.entity-card .stats-row .v { font-size: 0.875rem; font-weight: 500; }
.entity-card .stats-row .u { font-size: 0.75rem; color: var(--muted-foreground); }

/* Plant list row (Recent / Recently updated) */
.plant-list { display: flex; flex-direction: column; }
.plant-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.plant-row:last-child { border-bottom: 0; }
.plant-row .pill { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: var(--radius-md); flex-shrink: 0; }
.plant-row .pill svg { width: 1.1rem; height: 1.1rem; }
.plant-row .info { flex: 1; min-width: 0; }
.plant-row .info h4 { font-size: 0.9rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plant-row:hover .info h4 { color: var(--primary); }
.plant-row .info p { font-size: 0.75rem; color: var(--muted-foreground); }
.plant-row .cap { font-size: 0.85rem; font-weight: 600; text-align: right; white-space: nowrap; }
.plant-row .cap span { display: block; font-size: 0.7rem; color: var(--muted-foreground); font-weight: 400; }

/* Chart placeholder */
.chart-ph { height: 22rem; border-radius: var(--radius-xl); border: 1px solid var(--border); background: var(--card); padding: 1.5rem; display: flex; flex-direction: column; }
.chart-ph .bars { flex: 1; display: flex; align-items: flex-end; gap: 0.5rem; margin-top: 1rem; }
.chart-ph .bars .bar { flex: 1; background: color-mix(in oklab, var(--acc, var(--primary)) 65%, transparent); border-radius: 4px 4px 0 0; min-height: 8%; }
.donut { width: 12rem; height: 12rem; border-radius: 50%; margin: 1rem auto; background: conic-gradient(var(--blue-500) 0 32%, var(--yellow-500) 32% 55%, var(--cyan-500) 55% 72%, var(--green-500) 72% 86%, var(--purple-500) 86% 100%); position: relative; }
.donut::after { content: ""; position: absolute; inset: 26%; border-radius: 50%; background: var(--card); }

/* Legend */
.legend { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; justify-content: center; margin-top: 1rem; }
.legend .li { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--muted-foreground); }
.legend .dot { width: 0.7rem; height: 0.7rem; border-radius: 3px; }

/* Map placeholder */
.map-ph { position: relative; height: 30rem; border-radius: var(--radius-xl); border: 1px solid var(--border); overflow: hidden; background:
  radial-gradient(circle at 25% 35%, color-mix(in oklab, var(--blue-500) 22%, transparent), transparent 45%),
  radial-gradient(circle at 70% 60%, color-mix(in oklab, var(--green-500) 20%, transparent), transparent 45%),
  var(--muted); display: flex; align-items: center; justify-content: center; text-align: center; }
.map-ph .inner { background: color-mix(in oklab, var(--background) 82%, transparent); backdrop-filter: blur(4px); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem 2rem; max-width: 26rem; }

/* Prose (legal / about pages, @tailwindcss/typography analog) */
.prose { max-width: 46rem; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1.5rem; }
.prose p, .prose li { color: color-mix(in oklab, var(--foreground) 85%, var(--muted-foreground)); }
.prose ul, .prose ol { padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { font-weight: 600; }
.prose blockquote { border-left: 3px solid var(--border); padding-left: 1rem; color: var(--muted-foreground); font-style: italic; }

/* Page header */
.page-head { padding: 2rem 0 0.5rem; }
.page-head h1 { font-size: 2rem; }
.page-head p { color: var(--muted-foreground); margin-top: 0.5rem; max-width: 44rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 0.375rem; font-size: 0.8rem; color: var(--muted-foreground); margin-bottom: 0.75rem; }
.breadcrumb a:hover { color: var(--foreground); }
.breadcrumb .sep { opacity: 0.5; }

/* Search box */
.searchbox { position: relative; max-width: 32rem; }
.searchbox input { width: 100%; height: 2.75rem; border-radius: var(--radius-md); border: 1px solid var(--input); background: var(--background); padding: 0 1rem 0 2.5rem; }
.searchbox svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 1.1rem; height: 1.1rem; color: var(--muted-foreground); }

/* Table */
.tbl { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.tbl th, .tbl td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.tbl th { font-weight: 600; color: var(--muted-foreground); font-size: 0.8rem; }
.tbl tr:hover td { background: var(--muted); }
.rank { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted-foreground); }

/* ============================================================
   FOOTER
   ============================================================ */
.wpp-footer { border-top: 1px solid var(--border); background: var(--background); margin-top: 2rem; }
.wpp-footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; padding: 2rem 0; }
@media (min-width: 768px) { .wpp-footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; } }
@media (min-width: 1024px) { .wpp-footer-grid { grid-template-columns: repeat(5, 1fr); padding: 3rem 0; } }
.wpp-footer-brand { grid-column: span 2; }
@media (min-width: 1024px) { .wpp-footer-brand { grid-column: span 1; } }
.wpp-footer-brand .logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.wpp-footer-brand .logo img { width: 2.25rem; height: 2.25rem; }
.wpp-footer-brand p { font-size: 0.875rem; color: var(--muted-foreground); margin-top: 0.75rem; }
.wpp-footer-col h4 { font-weight: 600; margin-bottom: 0.75rem; }
.wpp-footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.wpp-footer-col a { font-size: 0.875rem; color: var(--muted-foreground); }
.wpp-footer-col a:hover { color: var(--foreground); }
.store-badges { display: flex; flex-direction: column; gap: 0.75rem; }
.store-badges a { display: inline-block; transition: opacity .15s; }
.store-badges a:hover { opacity: 0.8; }
.wpp-footer-bottom { border-top: 1px solid var(--border); padding: 2rem 0; text-align: center; font-size: 0.875rem; color: var(--muted-foreground); }
.wpp-footer-bottom a { color: var(--primary); }
.wpp-footer-bottom a:hover { text-decoration: underline; }

/* misc utilities used in templates */
.text-muted { color: var(--muted-foreground); }
.hide-lt-xl { display: none; } @media (min-width: 1280px) { .hide-lt-xl { display: inline; margin-left: 0.15rem; } }
.mono { font-family: var(--font-mono); }
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; }
.mt-2 { margin-top: 0.5rem; } .mt-4 { margin-top: 1rem; } .mb-4 { margin-bottom: 1rem; }
.tag { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--muted); color: var(--muted-foreground); }

/* Featured card — amber top strip (matches border-t-4 border-t-amber-500) */
.card-featured { border-top: 4px solid var(--amber-500); box-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.10); }
.pill-amber { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 999px; background: color-mix(in oklab, var(--amber-500) 15%, transparent); color: color-mix(in oklab, var(--amber-500) 75%, var(--foreground)); }
.pulse { animation: wpp-pulse 2s cubic-bezier(.4,0,.6,1) infinite; }
@keyframes wpp-pulse { 50% { opacity: .5; } }

/* progress bar (Top Countries) */
.progress { height: 0.5rem; background: var(--muted); border-radius: 999px; overflow: hidden; margin-top: 0.4rem; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

/* rank list rows (top countries / leaderboards) */
.rank-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0; }
.rank-row .n { width: 1.5rem; text-align: center; font-weight: 700; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.rank-row .grow { flex: 1; min-width: 0; }
.rank-row .grow .l1 { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.9rem; }
.rank-row .grow .l1 .name { font-weight: 500; }
.rank-row .grow .l1 .val { color: var(--muted-foreground); white-space: nowrap; }

/* definition list (Technical details) */
.dl { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 640px) { .dl { grid-template-columns: repeat(2, 1fr); gap: 0 2rem; } }
.dl .di { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.dl .di dt { color: var(--muted-foreground); font-size: 0.875rem; }
.dl .di dd { font-weight: 500; font-size: 0.875rem; text-align: right; }

/* amber notice (update request) */
.notice-amber { border: 1px solid color-mix(in oklab, var(--amber-500) 40%, var(--border)); background: color-mix(in oklab, var(--amber-500) 8%, var(--card)); border-radius: var(--radius-xl); padding: 1.25rem 1.5rem; }
.notice-amber h3 { display: flex; align-items: center; gap: 0.5rem; }
.notice-amber svg { color: var(--amber-500); }
.btn-amber { background: #d97706; color: #fff; }
.btn-amber:hover { background: #b45309; }

/* mini stat box (continent card / country profile — p-2 rounded-lg bg-muted) */
.ministat { background: var(--muted); border-radius: var(--radius-lg); padding: 0.6rem 0.5rem; text-align: center; }
.ministat svg { width: 1rem; height: 1rem; margin: 0 auto 0.25rem; }
.ministat .v { font-weight: 700; font-size: 0.95rem; }
.ministat .l { font-size: 0.68rem; color: var(--muted-foreground); }
.grid-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }

/* fuel icon box (fuel-type card — p-3 rounded-xl coloured) */
.fuel-ic { padding: 0.75rem; border-radius: var(--radius-xl); display: inline-flex; background: color-mix(in oklab, var(--fc) 15%, transparent); color: var(--fc); }
.fuel-ic svg { width: 1.5rem; height: 1.5rem; }

/* section intro paragraph */
.lead { color: var(--muted-foreground); max-width: 46rem; }

/* aspect video (map iframe) */
.aspect-video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.aspect-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* skip link + a11y */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary); color: var(--primary-foreground); padding: 0.5rem 1rem; z-index: 200; border-radius: 0 0 var(--radius-md) 0; }
.skip-link:focus { left: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
