/* =============================================================================
   NextGen Europe — "Cyber-Sustainable" design system
   Dark-mode premium · glassmorphism · biomorphic gradients · data micro-motion
   ============================================================================= */

:root {
  /* Surfaces */
  --bg:        #0B0F19;
  --bg-2:      #070A12;
  --panel:     rgba(255, 255, 255, 0.035);
  --panel-2:   rgba(255, 255, 255, 0.055);
  --line:      rgba(148, 170, 205, 0.14);
  --line-soft: rgba(148, 170, 205, 0.08);

  /* Type */
  --text:  #E9EEF8;
  --muted: #93A1BC;
  --faint: #64708A;

  /* Accents */
  --emerald: #2EE6A8;   /* sustainability  */
  --cyan:    #22D3EE;   /* deep tech       */
  --blue:    #5B8DEF;   /* advanced AI     */
  --violet:  #A78BFA;   /* quantum         */
  --gold:    #F5C451;

  --emerald-glow: rgba(46, 230, 168, 0.45);
  --cyan-glow:    rgba(34, 211, 238, 0.40);
  --violet-glow:  rgba(167, 139, 250, 0.40);
  --blue-glow:    rgba(91, 141, 239, 0.40);

  --radius:   18px;
  --radius-sm: 12px;
  --maxw:     1240px;
  --shadow:   0 24px 60px -28px rgba(0, 0, 0, 0.75);
}

/* Category → accent mapping (used by chips, gauges, tags) */
.accent-neutral { --accent: var(--muted);   --accent-glow: rgba(148,170,205,0.30); }
.accent-cyan    { --accent: var(--cyan);     --accent-glow: var(--cyan-glow); }
.accent-emerald { --accent: var(--emerald);  --accent-glow: var(--emerald-glow); }
.accent-blue    { --accent: var(--blue);     --accent-glow: var(--blue-glow); }
.accent-violet  { --accent: var(--violet);   --accent-glow: var(--violet-glow); }

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, .display {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

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

/* ---------------------------------------------------------------- Background */
/* Drifting biomorphic gradient mesh + grid + grain, all fixed behind content. */
.bg-layer { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

.bg-mesh::before,
.bg-mesh::after {
  content: "";
  position: absolute;
  width: 80vw; height: 80vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.bg-mesh::before {
  top: -28vw; left: -18vw;
  background: radial-gradient(circle at 30% 30%, rgba(46,230,168,0.32), transparent 62%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.bg-mesh::after {
  bottom: -32vw; right: -20vw;
  background: radial-gradient(circle at 60% 40%, rgba(34,211,238,0.28), transparent 60%);
  animation: drift-b 30s ease-in-out infinite alternate;
}
.bg-orb {
  position: absolute;
  top: 30%; left: 55%;
  width: 46vw; height: 46vw;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.35;
  background: radial-gradient(circle at 50% 50%, rgba(167,139,250,0.30), transparent 64%);
  animation: drift-c 34s ease-in-out infinite alternate;
}

.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148,170,205,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,170,205,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 40%, transparent 100%);
}
.bg-grain {
  position: absolute; inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift-a { from { transform: translate(0,0) scale(1); } to { transform: translate(8vw, 6vh) scale(1.12); } }
@keyframes drift-b { from { transform: translate(0,0) scale(1); } to { transform: translate(-7vw, -5vh) scale(1.1); } }
@keyframes drift-c { from { transform: translate(-50%,0) scale(1); } to { transform: translate(-42%, 8vh) scale(1.18); } }

/* ----------------------------------------------------------------- Layout */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }
.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }
.section-head { max-width: 760px; margin-bottom: 44px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted);
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--emerald); box-shadow: 0 0 10px var(--emerald-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }

.section h2 { font-size: clamp(28px, 4vw, 44px); margin: 18px 0 14px; }
.lead { color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); max-width: 64ch; }

/* ------------------------------------------------------------------ Glass */
.glass {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015)),
    var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  box-shadow: var(--shadow);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 1px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.6;
}

/* ----------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: "Space Grotesk", sans-serif; font-weight: 500; font-size: 14.5px;
  padding: 12px 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s, border-color .25s, background .25s;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-2px); border-color: var(--line); }
.btn-primary {
  border: none; color: #04110D; font-weight: 600;
  background: linear-gradient(120deg, var(--emerald), var(--cyan));
  box-shadow: 0 12px 30px -12px var(--emerald-glow);
}
.btn-primary:hover { box-shadow: 0 18px 40px -12px var(--cyan-glow); }
.btn-ghost:hover { background: var(--panel-2); }

/* -------------------------------------------------------------------- Nav */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(20px, 5vw, 48px);
  background: linear-gradient(180deg, rgba(11,15,25,0.86), rgba(11,15,25,0.35));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: transparent;
  box-shadow: 0 0 26px -7px var(--emerald-glow);
}
.brand-mark img { width: 100%; height: 100%; display: block; }
.brand-name { font-family: "Space Grotesk", sans-serif; font-weight: 600; letter-spacing: 0.02em; font-size: 16px; }
.brand-name span { color: var(--emerald); }
.brand-sub { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.28em; color: var(--faint); text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  font-size: 13.5px; color: var(--muted); padding: 8px 14px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--text); background: var(--panel); }
.nav-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--muted);
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
}
.nav-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 9px var(--emerald-glow); animation: pulse 2s infinite; }

/* -------------------------------------------------------------------- Hero */
.hero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero h1 {
  font-size: clamp(38px, 6.4vw, 76px);
  margin: 22px 0 22px;
}
.hero h1 .grad {
  background: linear-gradient(110deg, var(--emerald) 0%, var(--cyan) 48%, var(--violet) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); font-size: clamp(15px, 1.7vw, 19px); max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 40px; }
.hero-meta .item { display: flex; flex-direction: column; gap: 2px; }
.hero-meta .n { font-family: "Space Grotesk", sans-serif; font-size: 26px; font-weight: 600; }
.hero-meta .l { font-size: 12px; color: var(--faint); font-family: "IBM Plex Mono", monospace; letter-spacing: 0.1em; text-transform: uppercase; }

/* ----------------------------------------------------- Country constellation */
.constellation {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  padding: 22px; overflow: hidden;
}
.constellation .panel-tag {
  position: absolute; top: 18px; left: 18px; z-index: 5;
  font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}
.constellation .reset {
  position: absolute; top: 14px; right: 16px; z-index: 5;
  font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--faint);
  cursor: pointer; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-soft);
  transition: color .2s, border-color .2s;
}
.constellation .reset:hover { color: var(--emerald); border-color: var(--line); }
/* (legacy constellation-node styles removed — the map now uses real SVG geometry; see .emap below) */

/* ---------------------------------------------------------------- Metrics */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.metric { padding: 28px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.metric .top { display: flex; align-items: center; justify-content: space-between; }
.metric .icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--panel); color: var(--accent); }
.metric .icon svg { width: 21px; height: 21px; }
.metric .trend { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--accent); }
.metric .value { font-family: "Space Grotesk", sans-serif; font-size: clamp(34px, 5vw, 52px); font-weight: 600; line-height: 1; margin-top: 18px; }
.metric .value .unit { font-size: 0.5em; color: var(--muted); margin-left: 4px; }
.metric .label { color: var(--muted); font-size: 14px; }
.metric .bar { height: 5px; border-radius: 999px; background: var(--line-soft); margin-top: 16px; overflow: hidden; }
.metric .bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), transparent); transition: width 1.4s cubic-bezier(.2,.7,.2,1); }

/* ---------------------------------------------------------------- Toolbar */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between; margin-bottom: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
  transition: color .2s, border-color .2s, background .2s, transform .2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.chip .swatch { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.chip:hover { transform: translateY(-1px); color: var(--text); }
.chip.active { color: var(--text); border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); }

.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-wrap svg { position: absolute; right: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.country-select {
  appearance: none; -webkit-appearance: none;
  font-family: "Inter", sans-serif; font-size: 13px; color: var(--text);
  padding: 10px 38px 10px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); cursor: pointer;
}
.country-select:focus { outline: none; border-color: var(--emerald); }
.country-select option { background: var(--bg-2); color: var(--text); }

/* ------------------------------------------------------------- Ranking list */
.ranking { display: flex; flex-direction: column; gap: 12px; }
.result-meta { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--faint); }

.rank-card { padding: 0; overflow: hidden; transition: border-color .25s, transform .25s, box-shadow .25s; }
.rank-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 26px 60px -30px var(--accent-glow); }
.rank-main {
  display: grid; grid-template-columns: 56px 52px 1fr auto auto; align-items: center; gap: 20px;
  padding: 20px 24px; cursor: pointer; width: 100%; text-align: left; background: none; border: none; color: inherit;
}
.rank-num { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 22px; color: var(--faint); }
.rank-num b { color: var(--accent); }
.logo {
  width: 52px; height: 52px; border-radius: 13px; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line-soft), 0 8px 18px -10px rgba(0, 0, 0, 0.6);
}
.logo img { width: 100%; height: 100%; object-fit: contain; padding: 9px; }
.logo b { display: none; }
.logo.logo--mono {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #fff));
  box-shadow: 0 0 20px -6px var(--accent-glow);
}
.logo.logo--mono img { display: none; }
.logo.logo--mono b {
  display: block; font-family: "Space Grotesk", sans-serif; font-weight: 600;
  font-size: 18px; color: #04110D;
}
.rank-id .name { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rank-id .sector { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.rank-tail { display: flex; align-items: center; gap: 16px; justify-content: flex-end; }
.tag {
  font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

/* stylised country mark */
.flag { display: inline-flex; align-items: center; gap: 8px; }
.flag .stripes { width: 22px; height: 15px; border-radius: 3px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 0 0 1px var(--line-soft); }
.flag .stripes i { flex: 1; }
.flag .code { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }

/* paradigm score gauge */
.gauge { position: relative; width: 64px; height: 64px; display: grid; place-items: center; }
.gauge .ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--val) * 1%), rgba(148,170,205,0.14) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent 70%, #000 71%);
  mask: radial-gradient(farthest-side, transparent 70%, #000 71%);
  filter: drop-shadow(0 0 6px var(--accent-glow));
}
.gauge .v { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 18px; }
.gauge .c { position: absolute; bottom: -18px; font-family: "IBM Plex Mono", monospace; font-size: 9px; letter-spacing: 0.12em; color: var(--faint); text-transform: uppercase; }
.score-cell { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.chevron { color: var(--muted); transition: transform .3s; }
.rank-card.open .chevron { transform: rotate(180deg); }

/* expandable detail */
.rank-detail { max-height: 0; overflow: hidden; transition: max-height .4s cubic-bezier(.2,.7,.2,1); }
.rank-card.open .rank-detail { max-height: 1100px; }
.rank-detail-inner { padding: 4px 24px 24px; border-top: 1px solid var(--line-soft); }
.impact { color: var(--text); font-size: 15px; margin: 18px 0 6px; }
.thesis { color: var(--muted); font-size: 14px; font-style: italic; border-left: 2px solid var(--accent); padding-left: 14px; margin: 14px 0 20px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-soft); background: var(--panel); }
.stat .k { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.stat .val { font-family: "Space Grotesk", sans-serif; font-size: 20px; font-weight: 600; margin-top: 6px; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }

/* skeleton shimmer for data micro-loading */
.skeleton { display: flex; flex-direction: column; gap: 12px; }
.skeleton .row { height: 92px; border-radius: var(--radius); border: 1px solid var(--line-soft);
  background: linear-gradient(100deg, var(--panel) 30%, var(--panel-2) 50%, var(--panel) 70%);
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* --------------------------------------------------------------- Articles */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.article-card { padding: 24px; display: flex; flex-direction: column; gap: 14px; transition: transform .25s, border-color .25s; }
.article-card.is-readable { cursor: pointer; }
.article-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.article-card .top { display: flex; align-items: center; justify-content: space-between; }
.article-card .title { font-family: "Space Grotesk", sans-serif; font-size: 19px; font-weight: 600; line-height: 1.25; }
.article-card .excerpt { color: var(--muted); font-size: 14px; flex: 1; }
.article-card .meta { display: flex; align-items: center; gap: 14px; font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--faint); }
.article-card .meta .read { display: inline-flex; align-items: center; gap: 6px; }
.article-card .arrow { color: var(--accent); transition: transform .25s; }
.article-card:hover .arrow { transform: translate(4px, -4px); }

/* ----------------------------------------------------------------- Footer */
.footer { border-top: 1px solid var(--line-soft); padding-block: 48px; margin-top: 40px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.footer .muted { color: var(--muted); font-size: 13.5px; max-width: 46ch; margin-top: 12px; }
.footer .disclaimer { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--faint); margin-top: 18px; letter-spacing: 0.04em; }

/* ----------------------------------------------------- Entrance animations */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------- Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: rgba(148,170,205,0.22); border-radius: 999px; border: 3px solid var(--bg-2); }
::-webkit-scrollbar-thumb:hover { background: rgba(148,170,205,0.36); }

/* ------------------------------------------------------------- Responsive */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .constellation { max-width: 460px; margin-inline: auto; }
  .metrics { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 720px) {
  .rank-main { grid-template-columns: 44px 1fr auto auto; gap: 14px; }
  .rank-main .logo, .rank-main .chevron { display: none; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .nav-status { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-mesh::before, .bg-mesh::after, .bg-orb { animation: none; }
  .node .pin::after { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
  * { scroll-behavior: auto; }
}

/* =============================================================================
   PREMIUM v2 — deeper gradients · generous spacing · 3D pointer-tilt
   (later rules intentionally override the base values above)
   ============================================================================= */

:root { --radius: 22px; --radius-sm: 14px; --shadow: 0 40px 90px -34px rgba(0, 0, 0, 0.85); }

/* — deeper, layered background — */
.bg-mesh::before { opacity: 0.62; filter: blur(104px); }
.bg-mesh::after  { opacity: 0.55; filter: blur(104px); }
.bg-orb { opacity: 0.42; }
.bg-orb-2 {
  position: absolute; top: 6%; left: 6%;
  width: 38vw; height: 38vw; border-radius: 50%; filter: blur(120px); opacity: 0.32;
  background: radial-gradient(circle at 50% 50%, rgba(91, 141, 239, 0.30), transparent 64%);
  animation: drift-b 38s ease-in-out infinite alternate;
}
.bg-spotlight { background: radial-gradient(58% 46% at 50% -8%, rgba(120, 180, 255, 0.12), transparent 70%); }
.bg-vignette  { background: radial-gradient(125% 108% at 50% 36%, transparent 50%, rgba(3, 5, 10, 0.66) 100%); }

/* — flowing hero gradient — */
.hero h1 .grad {
  background: linear-gradient(110deg, var(--emerald) 0%, var(--cyan) 38%, var(--blue) 66%, var(--violet) 100%);
  background-size: 220% 220%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: grad-flow 14s ease infinite;
}
@keyframes grad-flow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* — generous spacing (more breathing room) — */
.container { padding-inline: clamp(22px, 5.5vw, 60px); }
.section { padding-block: clamp(92px, 12vw, 176px); }
.section-head { margin-bottom: 60px; max-width: 800px; }
.section h2 { font-size: clamp(30px, 4.4vw, 50px); margin: 22px 0 18px; }
.lead { line-height: 1.75; }
.hero { padding-top: clamp(64px, 8vw, 120px); padding-bottom: clamp(56px, 7vw, 96px); }
.hero-grid { gap: clamp(36px, 5vw, 80px); }
.hero h1 { margin: 26px 0; letter-spacing: -0.028em; }
.hero-sub { line-height: 1.75; }
.hero-cta { margin-top: 38px; gap: 16px; }
.hero-meta { margin-top: 48px; gap: 36px; }
.metrics { gap: 26px; }
.metric { padding: 36px; }
.metric .value { margin-top: 24px; }
.ranking { gap: 18px; }
.rank-main { padding: 28px 32px; gap: 26px; }
.rank-detail-inner { padding: 8px 32px 30px; }
.article-grid { gap: 26px; }
.article-card { padding: 32px; gap: 18px; }

/* — premium primary button with light sheen — */
.btn { padding: 13px 24px; }
.btn-primary {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--emerald) 0%, var(--cyan) 55%, var(--blue) 100%);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 28%, rgba(255, 255, 255, 0.4) 50%, transparent 72%);
  transform: translateX(-130%); transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
.btn-primary:hover::after { transform: translateX(130%); }

/* — gauge glow pulse — */
.gauge .ring { animation: gauge-glow 3.4s ease-in-out infinite alternate; }
@keyframes gauge-glow { from { filter: drop-shadow(0 0 4px var(--accent-glow)); } to { filter: drop-shadow(0 0 12px var(--accent-glow)); } }

/* — opacity-only reveal (composes cleanly with the 3D tilt transform) — */
.reveal-soft { opacity: 0; transition: opacity .85s ease; }
.reveal-soft.in { opacity: 1; }

/* — 3D pointer tilt + cursor-tracked glare — */
#metrics-grid, #ranking-list, #articles { perspective: 1500px; }
.tilt {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(0, var(--lift, 0px), 0);
  transition: transform .55s cubic-bezier(.2, .7, .2, 1), box-shadow .45s, border-color .45s;
}
.tilt:hover {
  --lift: -8px;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(0, var(--lift, 0px), 0);
  box-shadow: 0 50px 90px -38px var(--accent-glow, rgba(0, 0, 0, 0.7)), var(--shadow);
  transition: transform .12s ease-out, box-shadow .45s, border-color .45s;
}
.tilt:hover::before { opacity: 1; }
.glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; z-index: 3;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05) 26%, transparent 52%);
  transition: opacity .4s;
}
.tilt:hover .glare { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .tilt, .tilt:hover { transform: none !important; }
  .reveal-soft { opacity: 1 !important; }
  .bg-orb-2 { animation: none; }
  .hero h1 .grad, .gauge .ring { animation: none; }
}

/* =============================================================================
   Europe SVG map — supersedes the earlier constellation nodes
   ============================================================================= */
.constellation { aspect-ratio: 3 / 4; }

.emap { width: 100%; height: 100%; display: block; }
.emap .ec {
  fill: rgba(148, 170, 205, 0.05);
  stroke: rgba(148, 170, 205, 0.16);
  stroke-width: 1; vector-effect: non-scaling-stroke;
  transition: fill .25s, stroke .25s, opacity .25s;
}
.emap .ec.live { fill: rgba(34, 211, 238, 0.10); stroke: rgba(34, 211, 238, 0.42); cursor: pointer; }
.emap .ec.live:hover { fill: rgba(34, 211, 238, 0.24); stroke: var(--cyan); }
.emap .ec.sel { fill: rgba(46, 230, 168, 0.30); stroke: var(--emerald); }
.emap.has-sel .ec.live:not(.sel) { opacity: 0.5; }

.emap-mark { pointer-events: none; }
.emap-mark .halo { fill: var(--cyan); opacity: 0.13; transition: fill .25s, opacity .25s; }
.emap-mark .dot { fill: var(--cyan); stroke: #04110D; stroke-width: 2; transition: fill .25s; }
.emap-mark .num { fill: #04110D; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 30px; text-anchor: middle; dominant-baseline: central; }
.emap-mark .code { fill: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 25px; text-anchor: middle; letter-spacing: 1px; }
.emap-mark.sel .dot { fill: var(--emerald); }
.emap-mark.sel .halo { fill: var(--emerald); opacity: 0.24; }
.emap-mark.sel .code { fill: var(--emerald); }

/* =============================================================================
   Theme toggle + LIGHT theme ("analytical / Bloomberg" variant)
   ============================================================================= */
.nav-right { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  color: var(--muted); cursor: pointer; transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.theme-toggle:hover { color: var(--text); background: var(--panel-2); transform: translateY(-1px); }
.theme-toggle svg { width: 17px; height: 17px; }

[data-theme="light"] {
  --bg: #EEF1F8; --bg-2: #FFFFFF;
  --panel: rgba(15, 23, 42, 0.035); --panel-2: rgba(15, 23, 42, 0.06);
  --line: rgba(15, 23, 42, 0.14); --line-soft: rgba(15, 23, 42, 0.08);
  --text: #0C1426; --muted: #51607A; --faint: #5B6678;
  --emerald: #0BA678; --cyan: #0E96C4; --blue: #3866DB; --violet: #7A57E0; --gold: #C98A12;
  --emerald-glow: rgba(11, 166, 120, 0.28); --cyan-glow: rgba(14, 150, 196, 0.26);
  --blue-glow: rgba(56, 102, 219, 0.24); --violet-glow: rgba(122, 87, 224, 0.24);
  --shadow: 0 30px 60px -32px rgba(15, 23, 42, 0.30);
}
[data-theme="light"] body { background: var(--bg); }
[data-theme="light"] .nav { background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4)); border-bottom-color: var(--line-soft); }
[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
}
[data-theme="light"] .bg-vignette { background: radial-gradient(125% 108% at 50% 36%, transparent 62%, rgba(15, 23, 42, 0.10) 100%); }
[data-theme="light"] .bg-mesh::before { opacity: 0.40; }
[data-theme="light"] .bg-mesh::after { opacity: 0.36; }
[data-theme="light"] .bg-orb { opacity: 0.26; }
[data-theme="light"] .bg-orb-2 { opacity: 0.20; }
[data-theme="light"] .bg-grain { opacity: 0.02; }
[data-theme="light"] .glass::before { opacity: 0; }
[data-theme="light"] .emap .ec { fill: rgba(15, 23, 42, 0.04); stroke: rgba(15, 23, 42, 0.14); }
[data-theme="light"] .emap .ec.live { fill: rgba(14, 150, 196, 0.12); stroke: rgba(14, 150, 196, 0.5); }
[data-theme="light"] .emap-mark .dot { stroke: #fff; }
[data-theme="light"] .emap-mark .num { fill: #fff; }

/* =============================================================================
   Search · sort · methodology · focus-visible
   ============================================================================= */
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.search-wrap { position: relative; display: inline-flex; align-items: center; }
.search-wrap svg { position: absolute; left: 14px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search-input {
  font-family: "Inter", sans-serif; font-size: 13px; color: var(--text);
  padding: 11px 16px 11px 40px; width: 230px; max-width: 100%;
  border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
  transition: border-color .2s, background .2s;
}
.search-input::placeholder { color: var(--faint); }
.search-input:focus { outline: none; border-color: var(--emerald); background: var(--panel-2); }

.method { margin: 0 0 24px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--panel); }
.method summary { cursor: pointer; padding: 14px 18px; font-family: "Space Grotesk", sans-serif; font-size: 14px; color: var(--text); list-style: none; display: flex; align-items: center; gap: 11px; }
.method summary::-webkit-details-marker { display: none; }
.method summary::before { content: "i"; flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--cyan); color: var(--cyan); font-family: "Space Grotesk", serif; font-style: italic; font-size: 12px; }
.method[open] summary { border-bottom: 1px solid var(--line-soft); }
.method p { padding: 16px 18px; color: var(--muted); font-size: 14px; line-height: 1.75; margin: 0; }
.method strong { color: var(--text); font-weight: 600; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn:focus-visible, .chip:focus-visible { outline-offset: 3px; }
.emap .ec.live:focus { outline: none; }
.emap .ec.live:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }

/* =============================================================================
   Sustainability Leaders (real companies)
   ============================================================================= */
.leader-note { color: var(--text); font-size: 13px; line-height: 1.6; border-left: 2px solid var(--accent); padding-left: 12px; }
.stage {
  font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.stage-listed { color: var(--emerald); border-color: color-mix(in srgb, var(--emerald) 40%, transparent); background: color-mix(in srgb, var(--emerald) 12%, transparent); }
.stage-scaleup { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 40%, transparent); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.leader-link { display: inline-flex; align-items: center; gap: 6px; font-family: "IBM Plex Mono", monospace; font-size: 12.5px; color: var(--accent); margin-top: 4px; }
.leader-link svg { width: 14px; height: 14px; transition: transform .2s; }
.leader-link:hover { text-decoration: underline; }
.leader-link:hover svg { transform: translate(3px, -3px); }

/* =============================================================================
   Editorial article covers (cards + reader hero)
   ============================================================================= */
.article-card { padding: 0; overflow: hidden; gap: 0; }
.article-inner { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 13px; flex: 1; }
.article-cover { position: relative; height: 158px; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.article-cover svg { width: 100%; height: 100%; display: block; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.article-card:hover .article-cover svg { transform: scale(1.06); }
.article-cover .tag { position: absolute; top: 14px; left: 16px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.article-cover .arrow { position: absolute; top: 13px; right: 15px; color: var(--accent); transition: transform .25s; }
.article-card:hover .article-cover .arrow { transform: translate(4px, -4px); }

.reader-cover { height: 190px; flex: none; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.reader-cover svg { width: 100%; height: 100%; display: block; }
@media (max-width: 720px) { .reader-cover { height: 142px; } .article-cover { height: 134px; } }

/* =============================================================================
   Logo strip — animated marquee of tracked leaders
   ============================================================================= */
.logo-band { padding: 30px 0 34px; border-block: 1px solid var(--line-soft); }
.ls-label {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-family: "IBM Plex Mono", monospace; font-size: 11.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 24px;
}
.ls-label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 10px var(--emerald-glow); }
.ls-viewport {
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ls-track { display: flex; align-items: center; gap: 18px; width: max-content; animation: ls-scroll 46s linear infinite; padding: 4px 9px; }
.logo-band:hover .ls-track { animation-play-state: paused; }
.ls-item {
  flex: none; height: 56px; min-width: 132px; padding: 0 22px;
  display: grid; place-items: center; border-radius: 14px;
  background: #fff; box-shadow: 0 0 0 1px var(--line-soft), 0 10px 24px -16px rgba(0, 0, 0, 0.5);
}
.ls-item img { max-height: 30px; max-width: 92px; object-fit: contain; display: block; }
@keyframes ls-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ls-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
}
@media (max-width: 720px) { .ls-item { height: 48px; min-width: 104px; } }

/* =============================================================================
   Skip link + article reader (modal) + readable-card affordance
   ============================================================================= */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 400;
  padding: 10px 16px; border-radius: 0 0 12px 0;
  background: var(--emerald); color: #04110D; font-weight: 600;
  font-family: "Space Grotesk", sans-serif;
}
.skip-link:focus { left: 0; }
#main:focus { outline: none; }

html.reader-lock { overflow: hidden; }
.reader { position: fixed; inset: 0; z-index: 300; display: none; }
.reader.open { display: block; }
.reader-backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 5, 10, 0.66);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.reader-panel {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(760px, calc(100vw - 36px)); max-height: calc(100dvh - 64px);
  display: flex; flex-direction: column; overflow: hidden; padding: 0;
}
.reader-close {
  position: absolute; top: 14px; right: 14px; z-index: 4;
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  color: var(--muted); cursor: pointer; transition: color .2s, background .2s, transform .2s;
}
.reader-close:hover { color: var(--text); background: var(--panel-2); transform: translateY(-1px); }
.reader-close svg { width: 18px; height: 18px; }
.reader-scroll { overflow-y: auto; padding: clamp(28px, 4vw, 52px); }
.reader-tag { display: inline-block; }
.reader-h { font-size: clamp(26px, 3.6vw, 40px); margin: 16px 0 14px; }
.reader-meta {
  display: flex; flex-wrap: wrap; gap: 16px;
  font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--faint);
  margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line-soft);
}
.reader-body { color: var(--muted); font-size: 16px; line-height: 1.8; }
.reader-body h3 { color: var(--text); font-size: 22px; margin: 30px 0 12px; }
.reader-body h4 { color: var(--text); font-size: 17px; margin: 24px 0 10px; }
.reader-body p { margin: 0 0 16px; }
.reader-body strong { color: var(--text); font-weight: 600; }
.reader-body em { font-style: italic; }
.reader-body ul { margin: 0 0 18px; padding-left: 22px; display: flex; flex-direction: column; gap: 9px; }
.reader-body li { padding-left: 4px; }
.reader-body li::marker { color: var(--accent); }
.reader-body blockquote {
  margin: 22px 0; padding: 6px 0 6px 18px;
  border-left: 2px solid var(--accent); color: var(--text); font-style: italic;
}
.reader-body hr { border: none; border-top: 1px solid var(--line-soft); margin: 26px 0; }

@media (prefers-reduced-motion: no-preference) {
  .reader.open .reader-panel { animation: reader-in .3s cubic-bezier(.2, .7, .2, 1); }
}
@keyframes reader-in {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}
