@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  html,
  body,
  #root {
    width: 100%;
    height: 100%;
    min-height: 100%;
  }

  html {
    background: #0e0e0e;
  }

  body {
    margin: 0;
    background: #0e0e0e;
    color: #F4FAF6;
    font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
  }

  /* Editorial serif for page and section headings (RN <Text accessibilityRole="header"> renders as h1-h3 on web). */
  h1,
  h2,
  h3 {
    font-family: Fraunces, "Iowan Old Style", Georgia, "Times New Roman", serif;
    font-weight: 600;
    letter-spacing: -0.02em;
  }

  /* RN-web emits its own font-family on every Text; make our face the inherited default. */
  [dir] { font-family: inherit; }
  h1[dir], h2[dir], h3[dir] { font-family: Fraunces, "Iowan Old Style", Georgia, serif; }

  button,
  input,
  textarea,
  select {
    font: inherit;
  }

  ::selection {
    background: rgba(61, 220, 151, 0.28);
    color: #ffffff;
  }

  /* Visible, slim scroll bars everywhere (Nafi, 30 Oct 2026) */
  * {
    scrollbar-width: thin;
  }

  *::-webkit-scrollbar {
    display: block;
    width: 10px;
    height: 10px;
  }

  *::-webkit-scrollbar-track {
    background: #131313;
  }

  *::-webkit-scrollbar-thumb {
    background: #3c3c3c;
    border: 2px solid #131313;
    border-radius: 999px;
  }
}

@layer components {
  .esg-workspace-grid {
    background-color: #0e0e0e;
    background-image:
      radial-gradient(ellipse at 80% 0%, rgba(18, 168, 116, 0.055), transparent 55%);
  }

  .esg-primary-action {
    border: 1px solid rgba(61, 220, 151, 0.45);
    background: linear-gradient(135deg, #0a6b4b 0%, #0b8a5f 100%);
    box-shadow: 0 8px 24px rgba(11, 138, 95, 0.16);
  }

  .esg-primary-action:hover {
    box-shadow: 0 10px 30px rgba(61, 220, 151, 0.2);
  }

  .esg-primary-action:active {
    opacity: 0.84;
  }

  .esg-panel {
    border: 1px solid rgba(51, 65, 85, 0.62);
    background: linear-gradient(145deg, #212121, #171717);
    background-color: #151515;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10), 0 12px 32px rgba(0, 0, 0, 0.08);
  }

  .esg-panel-raised {
    border: 1px solid rgba(56, 75, 117, 0.9);
    background: #1b1b1b;
  }

  .esg-panel-hover {
    /* static base styling */
  }

  .esg-panel-hover:hover {
    border-color: rgba(100, 116, 139, 0.9);
    background-color: rgba(15, 23, 42, 0.72);
  }

  .esg-field {
    border: 1px solid rgba(51, 65, 85, 0.95);
    background: #151515;
    color: #F4FAF6;
    outline: none;
  }

  .esg-field:focus {
    border-color: rgba(61, 220, 151, 0.65);
    box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.08);
  }
}

/* ============================================================
   LIGHT THEME
   Dark stays the default (and the only theme on native, which never
   receives the data-theme attribute). On web, ThemeProvider sets
   <html data-theme="light"> and the rules below re-map the exact
   utility classes the app already uses — no screen changes needed.
   They are deliberately UN-layered and scoped under a two-part
   selector, so they outrank the generated single-class Tailwind
   rules no matter which style tag those arrive in.
   ============================================================ */

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="light"],
html[data-theme="light"] body {
  background: #F1F7F3;
  color: #1d1d1d;
}

html[data-theme="light"] ::selection {
  color: #1d1d1d;
}

html[data-theme="light"] * {
  scrollbar-color: #9aab9f #F1F7F3;
}

html[data-theme="light"] *::-webkit-scrollbar-track {
  background: #F1F7F3;
}

html[data-theme="light"] *::-webkit-scrollbar-thumb {
  background: #9aab9f;
  border-color: #F1F7F3;
}

/* --- shared component classes from this file --- */
html[data-theme="light"] .esg-workspace-grid {
  background-color: #F1F7F3;
  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);
}

html[data-theme="light"] .esg-panel {
  border-color: #D9EADF;
  background-image: none;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.025), 0 10px 28px rgba(15, 23, 42, 0.045);
}

html[data-theme="light"] .esg-panel-raised {
  border-color: #D9EADF;
  background-color: #F4FAF6;
}

html[data-theme="light"] .esg-panel-hover:hover {
  border-color: #9aab9f;
  background-color: #F1F7F3;
}

html[data-theme="light"] .esg-field {
  border-color: #D9EADF;
  background-color: #F4FAF6;
  color: #1d1d1d;
}

/* --- canvas + arbitrary surfaces used by the shell --- */
html[data-theme="light"] .bg-esg-dark { background-color: #F1F7F3; }
html[data-theme="light"] .bg-\[\#111111\] { background-color: #ffffff; }
html[data-theme="light"] .bg-\[\#121212\] { background-color: #F1F7F3; }
html[data-theme="light"] .bg-\[\#131313\] { background-color: #ffffff; }
html[data-theme="light"] .bg-\[\#151515\] { background-color: #F4FAF6; }
html[data-theme="light"] .bg-\[\#1b1b1b\] { background-color: #F1F7F3; }
html[data-theme="light"] .bg-\[\#1b1b1b\] { background-color: #F1F7F3; }
html[data-theme="light"] .bg-\[\#1f1f1f\] { background-color: #F4FAF6; }
html[data-theme="light"] .bg-\[\#2a2a2a\] { background-color: #d2f5e2; }
html[data-theme="light"] .bg-\[\#2e2e2e\] { background-color: #e6e3d8; }

/* --- slate surfaces --- */
html[data-theme="light"] .bg-slate-700 { background-color: #D9EADF; }
html[data-theme="light"] .bg-slate-800,
html[data-theme="light"] .bg-slate-800\/40,
html[data-theme="light"] .bg-slate-800\/50,
html[data-theme="light"] .bg-slate-800\/60 { background-color: #e6e3d8; }
html[data-theme="light"] .bg-slate-900\/50,
html[data-theme="light"] .bg-slate-900\/70,
html[data-theme="light"] .bg-slate-900\/60,
html[data-theme="light"] .bg-slate-900\/80,
html[data-theme="light"] .bg-slate-950\/30,
html[data-theme="light"] .bg-slate-950\/35,
html[data-theme="light"] .bg-slate-950\/40 { background-color: #F1F7F3; }
html[data-theme="light"] .bg-slate-500\/20,
html[data-theme="light"] .bg-slate-600\/40 { background-color: #e6e3d8; }
/* the mobile drawer scrim stays dark on purpose */
html[data-theme="light"] .bg-slate-950\/90 { background-color: rgba(15, 23, 42, 0.55); }

/* --- dark status panels become light tints --- */
html[data-theme="light"] .bg-amber-950\/40 { background-color: #fef3c7; }
html[data-theme="light"] .bg-emerald-950\/30 { background-color: #d1fae5; }
html[data-theme="light"] .bg-orange-950\/40 { background-color: #ffedd5; }
html[data-theme="light"] .bg-rose-950\/40 { background-color: #ffe4e6; }

/* --- body text: white / near-white becomes ink --- */
html[data-theme="light"] .text-white { color: #1d1d1d; }
html[data-theme="light"] .text-slate-100 { color: #1d1d1d; }
html[data-theme="light"] .text-slate-200 { color: #303030; }
html[data-theme="light"] .text-slate-300 { color: #404040; }
html[data-theme="light"] .text-slate-400 { color: #4b5c52; }
html[data-theme="light"] .text-slate-500,
html[data-theme="light"] .text-slate-600 { color: #4F6A5A; } /* 5.46:1 on #F1F7F3, 5.93:1 on white (was #6a7b70, 4.13-4.49:1) */
html[data-theme="light"] .text-teal-300,
html[data-theme="light"] .text-teal-400,
html[data-theme="light"] .text-esg-green { color: #0a6b4b; }

/* --- status text: pastel-on-dark → accessible hues-on-light --- */
html[data-theme="light"] .text-amber-200,
html[data-theme="light"] .text-amber-300 { color: #92400e; }
html[data-theme="light"] .text-amber-400 { color: #b45309; }
html[data-theme="light"] .text-blue-300 { color: #1d4ed8; }
html[data-theme="light"] .text-cyan-300,
html[data-theme="light"] .text-cyan-400 { color: #0e7490; }
html[data-theme="light"] .text-emerald-300,
html[data-theme="light"] .text-emerald-400 { color: #047857; }
html[data-theme="light"] .text-indigo-300 { color: #4338ca; }
html[data-theme="light"] .text-orange-300 { color: #c2410c; }
html[data-theme="light"] .text-purple-300 { color: #6d28d9; }
html[data-theme="light"] .text-red-300,
html[data-theme="light"] .text-red-400 { color: #b91c1c; }
html[data-theme="light"] .text-rose-300,
html[data-theme="light"] .text-rose-400 { color: #be123c; }
html[data-theme="light"] .text-sky-300 { color: #0369a1; }

/* --- hairlines: dark borders → light hairlines --- */
html[data-theme="light"] .border-slate-600,
html[data-theme="light"] .border-slate-700,
html[data-theme="light"] .border-slate-700\/50 { border-color: #9aab9f; }
html[data-theme="light"] .border-slate-800,
html[data-theme="light"] .border-slate-800\/50,
html[data-theme="light"] .border-slate-800\/70,
html[data-theme="light"] .border-slate-800\/80,
html[data-theme="light"] .border-slate-800\/90 { border-color: #D9EADF; }
html[data-theme="light"] .border-white\/40 { border-color: rgba(15, 23, 42, 0.3); }
html[data-theme="light"] .ring-white\/10 { --tw-ring-color: rgba(15, 23, 42, 0.14); }

/* --- labels that sit on a saturated fill keep white type --- */
html[data-theme="light"] .esg-primary-action .text-white,
html[data-theme="light"] .esg-primary-action.text-white,
html[data-theme="light"] .bg-esg-green .text-white,
html[data-theme="light"] .bg-esg-green.text-white,
html[data-theme="light"] .bg-esg-blue .text-white,
html[data-theme="light"] .bg-esg-blue.text-white,
html[data-theme="light"] .bg-esg-blue\/60 .text-white,
html[data-theme="light"] .bg-esg-blue\/60.text-white,
html[data-theme="light"] .bg-emerald-600 .text-white,
html[data-theme="light"] .bg-emerald-600.text-white,
html[data-theme="light"] .bg-emerald-600\/80 .text-white,
html[data-theme="light"] .bg-emerald-600\/80.text-white,
html[data-theme="light"] .bg-sky-600 .text-white,
html[data-theme="light"] .bg-sky-600.text-white,
html[data-theme="light"] .bg-red-600\/80 .text-white,
html[data-theme="light"] .bg-red-600\/80.text-white {
  color: #ffffff;
}

/* --- Stage 16 SaaS console: status chips, tints and accents --- */
html[data-theme="light"] .bg-amber-500\/10,
html[data-theme="light"] .bg-amber-500\/20 { background-color: #fef3c7; }
html[data-theme="light"] .bg-emerald-500\/20 { background-color: #d1fae5; }
html[data-theme="light"] .bg-red-500\/20 { background-color: #fee2e2; }
html[data-theme="light"] .bg-sky-500\/20 { background-color: #e0f2fe; }
html[data-theme="light"] .bg-teal-500\/20 { background-color: #d2f5e2; }
html[data-theme="light"] .bg-violet-500\/20 { background-color: #ede9fe; }
html[data-theme="light"] .bg-violet-400 { background-color: #7c3aed; }
html[data-theme="light"] .bg-slate-950\/50,
html[data-theme="light"] .bg-slate-900\/40 { background-color: #F4FAF6; }
html[data-theme="light"] .bg-emerald-500\/10 { background-color: #ecfdf5; }
html[data-theme="light"] .bg-teal-600 { background-color: #0b8a5f; } /* white label kept */

html[data-theme="light"] .border-amber-400\/60,
html[data-theme="light"] .border-amber-500\/30,
html[data-theme="light"] .border-amber-500\/40 { border-color: #f59e0b; }
html[data-theme="light"] .border-red-400\/50 { border-color: #ef4444; }
html[data-theme="light"] .border-emerald-500\/40 { border-color: #10b981; }
html[data-theme="light"] .border-teal-400\/30,
html[data-theme="light"] .border-teal-400\/40,
html[data-theme="light"] .border-teal-400\/50 { border-color: #12a874; }

html[data-theme="light"] .text-amber-100 { color: #78350f; }
html[data-theme="light"] .text-amber-300\/80 { color: #b45309; }
html[data-theme="light"] .text-emerald-200 { color: #065f46; }
html[data-theme="light"] .text-red-200,
html[data-theme="light"] .text-red-200\/90 { color: #991b1b; }
html[data-theme="light"] .text-teal-200 { color: #0a6b4b; }
html[data-theme="light"] .text-violet-300,
html[data-theme="light"] .text-violet-400 { color: #6d28d9; }


/* ============================================================
   NATIVE LIGHT THEME (Android / iOS)
   ------------------------------------------------------------
   The web sheet above is keyed on `html[data-theme="light"]`.
   React Native has no <html> element, so react-native-css-interop
   DROPS every one of those rules when it compiles for a device.
   That is why the installed APK stayed dark no matter what the
   toggle did.

   Native instead understands the standard media feature
   `prefers-color-scheme`, which css-interop compiles into a real
   runtime condition. Flipping the app theme calls
   Appearance.setColorScheme('light' | 'dark'), which is exactly
   what makes this query match or not match on a device.

   Keep these two sheets in sync: same colours, same intent.

   `display-mode: native` is what keeps this sheet OFF the web build: on the
   web the browser reports `browser`/`standalone`, never `native`, so the
   `html[data-theme="light"]` sheet above stays the single source of truth
   there. css-interop on a device resolves `(display-mode: native)` to true.
   ============================================================ */
@media (display-mode: native) and (prefers-color-scheme: light) {
  /* --- canvas + arbitrary surfaces used by the shell --- */
  .bg-esg-dark { background-color: #F1F7F3; }
  .bg-\[\#111111\] { background-color: #ffffff; }
  .bg-\[\#121212\] { background-color: #F1F7F3; }
  .bg-\[\#131313\] { background-color: #ffffff; }
  .bg-\[\#151515\] { background-color: #F4FAF6; }
  .bg-\[\#1b1b1b\] { background-color: #F1F7F3; }
  .bg-\[\#1b1b1b\] { background-color: #F1F7F3; }
  .bg-\[\#1f1f1f\] { background-color: #F4FAF6; }
  .bg-\[\#2a2a2a\] { background-color: #d2f5e2; }
  .bg-\[\#2e2e2e\] { background-color: #e6e3d8; }

  /* --- slate surfaces --- */
  .bg-slate-700 { background-color: #D9EADF; }
  .bg-slate-800,
  .bg-slate-800\/40,
  .bg-slate-800\/50,
  .bg-slate-800\/60 { background-color: #e6e3d8; }
  .bg-slate-900\/50,
  .bg-slate-900\/70,
  .bg-slate-900\/60,
  .bg-slate-900\/80,
  .bg-slate-950\/30,
  .bg-slate-950\/35,
  .bg-slate-950\/40 { background-color: #F1F7F3; }
  .bg-slate-500\/20,
  .bg-slate-600\/40 { background-color: #e6e3d8; }
  /* the mobile drawer scrim stays dark on purpose */
  .bg-slate-950\/90 { background-color: rgba(15, 23, 42, 0.55); }

  /* --- dark status panels become light tints --- */
  .bg-amber-950\/40 { background-color: #fef3c7; }
  .bg-emerald-950\/30 { background-color: #d1fae5; }
  .bg-orange-950\/40 { background-color: #ffedd5; }
  .bg-rose-950\/40 { background-color: #ffe4e6; }

  /* --- shared component classes from this file --- */
  .esg-workspace-grid {
    background-color: #F1F7F3;
    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);
  }

  .esg-panel {
    border-color: #D9EADF;
    background-image: none;
    background-color: #ffffff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
  }

  .esg-panel-raised {
    border-color: #D9EADF;
    background-color: #F4FAF6;
  }

  .esg-field {
    border-color: #D9EADF;
    background-color: #F4FAF6;
    color: #1d1d1d;
  }
}


/* --- native: body text, white / near-white becomes ink --- */
@media (display-mode: native) and (prefers-color-scheme: light) {
  .text-white { color: #1d1d1d; }
  .text-slate-100 { color: #1d1d1d; }
  .text-slate-200 { color: #303030; }
  .text-slate-300 { color: #404040; }
  .text-slate-400 { color: #4b5c52; }
  .text-slate-500,
  .text-slate-600 { color: #4F6A5A; } /* 5.46:1 on #F1F7F3, 5.93:1 on white (was #6a7b70, 4.13-4.49:1) */
  .text-teal-300,
  .text-teal-400,
  .text-esg-green { color: #0a6b4b; }

  /* --- native: status text: pastel-on-dark -> accessible hues-on-light --- */
  .text-amber-200,
  .text-amber-300 { color: #92400e; }
  .text-amber-400 { color: #b45309; }
  .text-blue-300 { color: #1d4ed8; }
  .text-cyan-300,
  .text-cyan-400 { color: #0e7490; }
  .text-emerald-300,
  .text-emerald-400 { color: #047857; }
  .text-indigo-300 { color: #4338ca; }
  .text-orange-300 { color: #c2410c; }
  .text-purple-300 { color: #6d28d9; }
  .text-red-300,
  .text-red-400 { color: #b91c1c; }
  .text-rose-300,
  .text-rose-400 { color: #be123c; }
  .text-sky-300 { color: #0369a1; }

  /* --- native: hairlines: dark borders -> light hairlines --- */
  .border-slate-600,
  .border-slate-700,
  .border-slate-700\/50 { border-color: #9aab9f; }
  .border-slate-800,
  .border-slate-800\/40,
  .border-slate-800\/50,
  .border-slate-800\/70,
  .border-slate-800\/80,
  .border-slate-800\/90 { border-color: #D9EADF; }
  .border-white\/40 { border-color: rgba(15, 23, 42, 0.3); }

  /* --- native: labels on a saturated fill keep white type --- */
  .esg-primary-action .text-white,
  .esg-primary-action.text-white,
  .bg-esg-green .text-white,
  .bg-esg-green.text-white,
  .bg-esg-blue .text-white,
  .bg-esg-blue.text-white,
  .bg-esg-blue\/60 .text-white,
  .bg-esg-blue\/60.text-white,
  .bg-emerald-600 .text-white,
  .bg-emerald-600.text-white,
  .bg-emerald-600\/80 .text-white,
  .bg-emerald-600\/80.text-white,
  .bg-sky-600 .text-white,
  .bg-sky-600.text-white,
  .bg-red-600\/80 .text-white,
  .bg-red-600\/80.text-white {
    color: #ffffff;
  }

  /* --- native: Stage 16 SaaS console chips, tints and accents --- */
  .bg-amber-500\/10,
  .bg-amber-500\/20 { background-color: #fef3c7; }
  .bg-emerald-500\/20 { background-color: #d1fae5; }
  .bg-red-500\/20 { background-color: #fee2e2; }
  .bg-sky-500\/20 { background-color: #e0f2fe; }
  .bg-teal-500\/20 { background-color: #d2f5e2; }
  .bg-violet-500\/20 { background-color: #ede9fe; }
  .bg-violet-400 { background-color: #7c3aed; }
  .bg-slate-950\/50,
  .bg-slate-900\/40 { background-color: #F4FAF6; }
  .bg-emerald-500\/10 { background-color: #ecfdf5; }
  .bg-teal-600 { background-color: #0b8a5f; } /* white label kept */

  .border-amber-400\/60,
  .border-amber-500\/30,
  .border-amber-500\/40 { border-color: #f59e0b; }
  .border-red-400\/50 { border-color: #ef4444; }
  .border-emerald-500\/40 { border-color: #10b981; }
  .border-teal-400\/30,
  .border-teal-400\/40,
  .border-teal-400\/50 { border-color: #12a874; }

  .text-amber-100 { color: #78350f; }
  .text-amber-300\/80 { color: #b45309; }
  .text-emerald-200 { color: #065f46; }
  .text-red-200,
  .text-red-200\/90 { color: #991b1b; }
  .text-teal-200 { color: #0a6b4b; }
  .text-violet-300,
  .text-violet-400 { color: #6d28d9; }
}

/* Shared product polish; uses the existing navy, slate and teal palette. */
.esg-input { outline: none; }
.esg-input-wrap:focus-within { box-shadow: 0 0 0 3px rgba(18, 168, 116, 0.09); }
.esg-auth-card { box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15); }
.esg-dialog { box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22); }
.esg-topbar { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.025); }
.esg-detail-cell { overflow-wrap: anywhere; }
.esg-detail-cell * { overflow-wrap: anywhere; }
[role="button"]:focus-visible { outline: 2px solid #0b8a5f; outline-offset: 3px; }
html[data-theme="light"] .esg-auth-card { box-shadow: 0 20px 60px rgba(15, 23, 42, 0.075); }
html[data-theme="light"] .esg-dialog { box-shadow: 0 24px 80px rgba(15, 23, 42, 0.14); }
html[data-theme="light"] .esg-detail-cell { background-color: #F4FAF6; }
@media (hover: hover) {
  .esg-button-secondary:hover, .esg-select:hover, .esg-icon-button:hover { border-color: #0b8a5f; }
  .esg-nav-item:hover, .esg-select-option:hover { background-color: rgba(18, 168, 116, 0.06); }
}

/* Dropdown lists: always show a visible scrollbar so long lists can be scrolled with the mouse */
.esg-select-scroll { scrollbar-width: thin !important; scrollbar-color: #9aab9f transparent; overflow-y: auto !important; }
.esg-select-scroll::-webkit-scrollbar { display: block !important; }
.esg-select-scroll::-webkit-scrollbar { width: 8px; }
.esg-select-scroll::-webkit-scrollbar-thumb { background-color: #9aab9f; border-radius: 8px; }
.esg-select-scroll::-webkit-scrollbar-track { background: transparent; }

/* Horizontal tab strips keep a hidden scrollbar */
.esg-hide-scrollbar { scrollbar-width: none !important; }
.esg-hide-scrollbar::-webkit-scrollbar { display: none !important; }


/* ============================================================
   VERDANT THEME — shell polish (web)
   ============================================================ */
.esg-sidebar { box-shadow: 4px 0 24px rgba(25, 25, 25, 0.12); }
.esg-sidebar .esg-nav-item:hover { background-color: rgba(75, 227, 160, 0.08) !important; }
.esg-topbar { backdrop-filter: saturate(1.2) blur(6px); }
html[data-theme="light"] .esg-topbar { background-color: rgba(250, 248, 243, 0.92) !important; }
html[data-theme="light"] .esg-page-heading { border-color: #D9EADF; }
.esg-primary-action { border-radius: 12px; }
html[data-theme="light"] .esg-workspace-grid {
  background-image:
    radial-gradient(ellipse at 85% -10%, rgba(18, 168, 116, 0.10), transparent 50%),
    radial-gradient(ellipse at 0% 100%, rgba(30, 58, 218, 0.06), transparent 45%);
}
.esg-auth-bg {
  background-color: #0e0e0e;
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(61, 220, 151, 0.16), transparent 50%),
    radial-gradient(ellipse at 90% 90%, rgba(232, 163, 23, 0.10), transparent 45%);
}
html[data-theme="light"] .esg-auth-bg {
  background-color: #F1F7F3;
  background-image:
    radial-gradient(ellipse at 12% 8%, rgba(18, 168, 116, 0.16), transparent 52%),
    radial-gradient(ellipse at 92% 92%, rgba(232, 163, 23, 0.12), transparent 46%);
}
::selection { background: rgba(61, 220, 151, 0.30); }

/* ===== Verdant motion & gradient layer (web) ===== */
.esg-sidebar{transition:width .35s cubic-bezier(.2,.8,.2,1);}
html:not([data-theme="light"]) .esg-sidebar{background-image:none!important;background-color:#111111!important}
html[data-theme="light"] .esg-sidebar{background-image:none!important;background-color:#FFFFFF!important;box-shadow:4px 0 24px rgba(0,0,0,.06)}
html[data-theme="light"] .esg-sidebar .esg-nav-item:hover{background-color:rgba(0,122,56,.08)!important}
.esg-edge-toggle{box-shadow:0 6px 18px rgba(18,168,116,.45);transition:transform .25s,box-shadow .25s}.esg-edge-toggle:hover{transform:scale(1.12)}

@keyframes esgRise{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
@keyframes esgFade{from{opacity:0}to{opacity:1}}
@keyframes esgShine{0%{background-position:0% 50%}100%{background-position:200% 50%}}
@keyframes esgFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-14px)}}
@keyframes esgDrift{0%{transform:translate(0,0) scale(1)}100%{transform:translate(40px,30px) scale(1.15)}}
@keyframes esgPulseRing{0%{box-shadow:0 0 0 0 rgba(18,168,116,.45)}100%{box-shadow:0 0 0 14px rgba(18,168,116,0)}}

/* page entrance: heading, then every block below it, staggered */
.esg-page-heading{animation:esgRise .6s cubic-bezier(.2,.8,.2,1) both}
.esg-page-heading ~ *{animation:esgRise .75s cubic-bezier(.2,.8,.2,1) both;animation-delay:.12s}
.esg-page-heading ~ *:nth-child(n+5){animation-delay:.2s}
.esg-page-heading ~ *:nth-child(n+7){animation-delay:.28s}
.esg-page-heading ~ *:nth-child(n+9){animation-delay:.36s}

/* gradient page title */
/* fit-content: the gradient spans the word, not the full-width block. A->B->A + 200% size loops with no seam (the seam used to split words, e.g. "Targe|ts"). */
.esg-page-heading h1{width:fit-content;max-width:100%;background-image:linear-gradient(100deg,#35D07F 0%,#5B78FF 50%,#35D07F 100%);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;color:transparent!important;animation:esgShine 9s linear infinite}
/* light: #007A38 5.03:1 and #1E3ADA 7.24:1 on #F1F7F3 (large text needs 3:1; #00B050 was 2.64:1) */
html[data-theme="light"] .esg-page-heading h1{background-image:linear-gradient(100deg,#007A38 0%,#1E3ADA 50%,#007A38 100%)}
.esg-page-heading{position:relative}
.esg-page-heading::after{content:"";position:absolute;left:0;bottom:-1px;height:2px;width:120px;background:linear-gradient(90deg,#12a874,#4be3a0,transparent);border-radius:2px;animation:esgFade 1s .4s both}

/* cards: lift, glow and a gradient edge */
.esg-panel,.esg-summary-card,.esg-dashboard-widget{transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s,border-color .3s}
.esg-summary-card,.esg-dashboard-widget,.esg-panel-hover{position:relative;overflow:hidden}
.esg-summary-card::before,.esg-dashboard-widget::before,.esg-panel-raised::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:linear-gradient(90deg,#12a874,#4be3a0,#1E3ADA);border-top-left-radius:inherit;border-top-right-radius:inherit;opacity:.85}
.esg-panel-raised{position:relative}
.esg-summary-card:hover,.esg-dashboard-widget:hover,.esg-panel-hover:hover{transform:translateY(-4px);box-shadow:0 22px 50px rgba(24, 24, 24,.22);border-color:rgba(18,168,116,.55)}

/* buttons: gradient + sheen */
/* gradient starts at #007A38: white labels 5.47-6.53:1 (from #12a874 they were 3.05:1) */
.esg-primary-action{background-image:linear-gradient(135deg,#007A38 0%,#0a6b4b 100%)!important;box-shadow:0 8px 22px rgba(18,168,116,.32);transition:transform .25s cubic-bezier(.2,.8,.2,1),box-shadow .25s,filter .25s;position:relative;overflow:hidden}
.esg-primary-action:hover{transform:translateY(-2px);box-shadow:0 14px 32px rgba(18,168,116,.45);filter:brightness(1.06)}
.esg-primary-action:active{transform:translateY(0)}
.esg-primary-action::after{content:"";position:absolute;top:0;left:-60%;width:40%;height:100%;background:linear-gradient(110deg,transparent,rgba(255,255,255,.35),transparent);transform:skewX(-20deg);transition:left .7s}
.esg-primary-action:hover::after{left:130%}
.esg-button-secondary{transition:transform .25s,border-color .25s,box-shadow .25s}.esg-button-secondary:hover{transform:translateY(-2px);border-color:#12a874!important;box-shadow:0 10px 24px rgba(18,168,116,.16)}

/* sidebar polish */
.esg-sidebar .esg-nav-item{transition:background-color .25s,transform .25s}.esg-sidebar .esg-nav-item:hover{transform:translateX(3px)}
.esg-topbar{background-image:linear-gradient(90deg,rgba(18,168,116,.06),transparent 40%,rgba(30,58,218,.05))}
html[data-theme="light"] .esg-workspace-grid{background-image:radial-gradient(ellipse at 85% -10%,rgba(18,168,116,.14),transparent 50%),radial-gradient(ellipse at 0% 100%,rgba(30,58,218,.10),transparent 45%),radial-gradient(ellipse at 50% 40%,rgba(127,214,255,.07),transparent 55%)}

/* login / auth: animated gradient mesh */
.esg-auth-bg{position:relative;background-color:#0e0e0e;background-image:radial-gradient(45% 45% at 15% 15%,rgba(18,168,116,.55),transparent 70%),radial-gradient(40% 40% at 85% 20%,rgba(127,214,255,.22),transparent 70%),radial-gradient(45% 45% at 75% 90%,rgba(30,58,218,.22),transparent 70%),linear-gradient(160deg,#181818,#0f0f0f);background-size:140% 140%;animation:esgShine 22s ease-in-out infinite alternate}
html[data-theme="light"] .esg-auth-bg{background-color:#eef6f1;background-image:radial-gradient(45% 45% at 12% 12%,rgba(18,168,116,.30),transparent 70%),radial-gradient(40% 40% at 88% 18%,rgba(127,214,255,.28),transparent 70%),radial-gradient(45% 45% at 78% 92%,rgba(30,58,218,.26),transparent 70%),linear-gradient(160deg,#f4f8f2,#e6f2ea)}
.esg-auth-card{animation:esgRise .9s cubic-bezier(.2,.8,.2,1) both;backdrop-filter:blur(14px)}
.esg-orb{position:absolute;border-radius:50%;filter:blur(60px);opacity:.5;pointer-events:none;animation:esgDrift 14s ease-in-out infinite alternate}
.esg-float{animation:esgFloat 6s ease-in-out infinite}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

.esg-grad-text{background-image:linear-gradient(100deg,#35D07F,#5B78FF 55%,#35D07F);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;color:transparent!important;animation:esgShine 8s linear infinite}
html[data-theme="light"] .esg-grad-text{background-image:linear-gradient(100deg,#00B050,#1E3ADA 55%,#00B050)}

/* ===== dashboard motion ===== */
@keyframes esgSpin{to{transform:rotate(360deg)}}
@keyframes esgMarquee{to{transform:translateX(-50%)}}
@keyframes esgPing{0%{transform:scale(1);opacity:.55}100%{transform:scale(2.6);opacity:0}}
@keyframes esgBreathe{0%,100%{transform:scale(1);opacity:.7}50%{transform:scale(1.18);opacity:1}}
@keyframes esgSweep{0%{transform:translateX(-120%) skewX(-20deg)}60%,100%{transform:translateX(320%) skewX(-20deg)}}
@keyframes esgHero{0%{background-position:0% 50%}100%{background-position:100% 50%}}
.esg-spin-slow{animation:esgSpin 28s linear infinite}
.esg-marquee{animation:esgMarquee 38s linear infinite}
.esg-ping{animation:esgPing 1.8s ease-out infinite}
.esg-breathe{animation:esgBreathe 3.2s ease-in-out infinite}
.esg-blob{animation:esgDrift 12s ease-in-out infinite alternate}
.esg-hero-bg{background-image:linear-gradient(120deg,#181818 0%,#0b6b4b 45%,#1593a3 100%)!important;background-size:220% 220%;animation:esgHero 12s ease-in-out infinite alternate}
.esg-sheen{position:relative;overflow:hidden}
.esg-sheen::after{content:"";position:absolute;top:0;left:0;width:35%;height:100%;background:linear-gradient(110deg,transparent,rgba(255,255,255,.38),transparent);pointer-events:none;animation:esgSweep 5.5s ease-in-out infinite}
.esg-lift{transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s}
.esg-lift:hover{transform:translateY(-5px) scale(1.01);box-shadow:0 26px 56px rgba(24, 24, 24,.22)!important}

/* ===== sidebar v2 ===== */
@keyframes esgSubIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
.esg-sub-in{animation:esgSubIn .38s cubic-bezier(.2,.8,.2,1) both}
.esg-chevron{transition:transform .3s cubic-bezier(.2,.8,.2,1)}
.esg-nav-section .esg-nav-tile{transition:transform .35s cubic-bezier(.2,.8,.2,1)}
.esg-nav-section:hover .esg-nav-tile{transform:rotate(-8deg) scale(1.1)}
.esg-sidebar .esg-nav-leaf:hover{transform:translateX(4px)}

/* ---- Dark mode: form rows must stay readable (labels, input wells, selects) ---- */
html:not([data-theme="light"]) .esg-input-wrap,
html:not([data-theme="light"]) .esg-select {
  background-color: #1f1f1f !important;
  border-color: rgba(120, 200, 165, 0.30) !important;
}
html:not([data-theme="light"]) .esg-input-wrap:focus-within,
html:not([data-theme="light"]) .esg-select:hover { border-color: #3DDC97 !important; background-color: #292929 !important; }
html:not([data-theme="light"]) .esg-input { color: #F1F8F4 !important; caret-color: #3DDC97; }
html:not([data-theme="light"]) .esg-input::placeholder { color: #7F9A8C !important; }
html:not([data-theme="light"]) .esg-select-menu { background-color: #1f1f1f !important; border-color: rgba(120,200,165,.3) !important; }
html:not([data-theme="light"]) input[type="date"] { color-scheme: dark; }
@keyframes esgPop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
.esg-pop-in { animation: esgPop .22s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom left; }
@keyframes esgTyping { 0%,80%,100% { transform: translateY(0); opacity:.35; } 40% { transform: translateY(-6px); opacity:1; } }
.esg-typing-dot { animation: esgTyping 1.1s ease-in-out infinite; }
.esg-rise { animation: esgRise .45s cubic-bezier(.2,.8,.2,1) both; }
/* search pill: animated gradient hairline */
.esg-search-pill { position: relative; background: linear-gradient(#212121,#212121) padding-box, linear-gradient(120deg,#10B981,#5B78FF,#22D3EE,#10B981) border-box; border: 1.5px solid transparent; background-size: 100% 100%, 300% 300%; animation: esgShine 6s linear infinite; transition: transform .25s, box-shadow .25s; cursor: text; }
.esg-search-pill:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(16,185,129,.28); }
html[data-theme="light"] .esg-search-pill { background: linear-gradient(#fff,#fff) padding-box, linear-gradient(120deg,#10B981,#5B78FF,#22D3EE,#10B981) border-box; }
html[data-theme="light"] .esg-search-pill * { color: #404040 !important; }

/* ===== v12.1 login animations (green -> blue) ===== */
@keyframes esgNodeA{0%,100%{transform:translate(0,0)}50%{transform:translate(18px,-22px)}}
@keyframes esgNodeB{0%,100%{transform:translate(0,0)}50%{transform:translate(-20px,16px)}}
@keyframes esgNodeC{0%,100%{transform:translate(0,0)}50%{transform:translate(12px,20px)}}
@keyframes esgLine{0%,100%{opacity:.15}50%{opacity:.75}}
@keyframes esgSlideIn{from{opacity:0;transform:translateX(-26px)}to{opacity:1;transform:none}}
@keyframes esgPop{0%{opacity:0;transform:scale(.5)}70%{transform:scale(1.12)}100%{opacity:1;transform:none}}
@keyframes esgGlow{0%,100%{box-shadow:0 0 0 0 rgba(0,176,80,.35)}50%{box-shadow:0 0 0 10px rgba(0,176,80,0)}}
.esg-net{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.esg-net svg{width:100%;height:100%}
.esg-net .na{animation:esgNodeA 8s ease-in-out infinite}.esg-net .nb{animation:esgNodeB 10s ease-in-out infinite}.esg-net .nc{animation:esgNodeC 9s ease-in-out infinite}
.esg-net line{animation:esgLine 5s ease-in-out infinite}.esg-net line:nth-child(2n){animation-delay:-1.5s}.esg-net line:nth-child(3n){animation-delay:-3s}
.esg-auth-bg .esg-auth-left > *{animation:esgSlideIn .8s cubic-bezier(.2,.8,.2,1) both}
.esg-auth-bg .esg-auth-left > *:nth-child(1){animation-delay:.1s}.esg-auth-bg .esg-auth-left > *:nth-child(2){animation-delay:.25s}.esg-auth-bg .esg-auth-left > *:nth-child(3){animation-delay:.4s}.esg-auth-bg .esg-auth-left > *:nth-child(4){animation-delay:.55s}.esg-auth-bg .esg-auth-left > *:nth-child(5){animation-delay:.7s}
.esg-auth-bg .esg-step-row{animation:esgSlideIn .7s cubic-bezier(.2,.8,.2,1) both}
.esg-auth-bg .esg-step-row:nth-child(2){animation-delay:.8s}.esg-auth-bg .esg-step-row:nth-child(3){animation-delay:1s}.esg-auth-bg .esg-step-row:nth-child(4){animation-delay:1.2s}
.esg-auth-bg .esg-logo{animation:esgPop .8s cubic-bezier(.2,.8,.2,1) both,esgGlow 3s ease-in-out 1s infinite}
.esg-auth-bar{background-size:200% 100%;animation:esgShine 4s linear infinite}
.esg-auth-card .esg-primary-action{background-image:linear-gradient(100deg,#007A38,#1E3ADA,#007A38)!important;background-size:200% 100%;animation:esgShine 6s linear infinite}
@media (prefers-reduced-motion:reduce){.esg-net *,.esg-auth-bg *{animation:none!important}}

/* Settings page: switches are real checkboxes (role=switch) under a drawn track; visible keyboard focus. */
.esg-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; z-index: 1; }
.esg-switch input:focus-visible + span { outline: 2px solid #1E3ADA; outline-offset: 2px; }
html:not([data-theme="light"]) .esg-switch input:focus-visible + span { outline-color: #8FA3FF; }
.esg-focus:focus-visible { outline: 2px solid #1E3ADA !important; outline-offset: 2px; }
html:not([data-theme="light"]) .esg-focus:focus-visible { outline-color: #8FA3FF !important; }
.esg-set-row:hover { background-color: #F1F8F4; }
html:not([data-theme="light"]) .esg-set-row:hover { background-color: #1C1C1C; }
.esg-set-link:hover { opacity: .8; }

/* ===================================================================
   Sun / moon theme switch, bloom, notification bell (approved dashboard preview)
   Motion is off under html[data-anim="off"] (Animations preference / reduced motion)
   and under prefers-reduced-motion; loops pause while the tab is hidden.
   =================================================================== */
.esg-sky { all: unset; box-sizing: border-box; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: block; position: relative; z-index: 7; flex: none; }
.esg-sky:focus-visible { outline: 2px solid #1E3ADA; outline-offset: 3px; }
html[data-theme="dark"] .esg-sky:focus-visible { outline-color: #8FA3FF; }
.esg-sky svg { display: block; overflow: visible; transition: transform .2s; }
.esg-sky:hover svg { transform: scale(1.06); }
.esg-sky .ring { stroke: #D3E0D8; }
html[data-theme="dark"] .esg-sky .ring { stroke: #2C2C2C; }
.esg-sky .body { transition: transform 1s cubic-bezier(.2,.85,.25,1); }
.esg-sky .dayfade, .esg-sky .stars { transition: opacity .9s; }
.esg-sky .ground { fill: #1B2A22; transition: fill .9s; }
.esg-sky .sun { transform: translateY(40px); }
.esg-sky .moon { transform: translateY(0); }
.esg-sky .dayfade { opacity: 0; }
.esg-sky .stars { opacity: 1; }
.esg-sky.on .sun { transform: translateY(0); }
.esg-sky.on .moon { transform: translateY(40px); }
.esg-sky.on .dayfade { opacity: 1; }
.esg-sky.on .stars { opacity: 0; }
.esg-sky.on .ground { fill: #BFE3CE; }
.esg-sky .rays { transform-origin: 24px 22px; animation: esg-spin 16s linear infinite; }
.esg-sky .sunglow { transform-origin: 24px 22px; animation: esg-breathe 3.4s ease-in-out infinite; }
.esg-sky .star { fill: #fff; animation: esg-twinkle 2.6s ease-in-out infinite; }
@keyframes esg-spin { to { transform: rotate(360deg); } }
@keyframes esg-breathe { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes esg-twinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
/* Local, round glow: 260px, centred on the switch (positioned by ThemeToggle). Never full-page. */
#esg-bloom { position: fixed; left: 0; top: 0; width: 260px; height: 260px; border-radius: 50%; pointer-events: none; opacity: 0; z-index: 6;
  background: radial-gradient(circle, rgba(var(--bc,255,250,190),.9) 0, rgba(var(--bc,255,247,165),.5) 32%, rgba(var(--bc,255,247,165),0) 68%); }
#esg-bloom.go { animation: esg-bloom 1.3s ease-out; }
@keyframes esg-bloom { 0% { opacity: 0; transform: scale(.2); } 15% { opacity: 1; } 100% { opacity: 0; transform: scale(1.25); } }

/* Bell */
.esg-notifwrap { position: relative; flex: none; }
.esg-bell { all: unset; box-sizing: border-box; position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #14201A; border: 1px solid #D3E0D8; background: #FFFFFF; margin: 0 4px; }
.esg-bell.compact { margin: 0; }
html[data-theme="dark"] .esg-bell { color: #F1F7F3; border-color: #2C2C2C; background: #171717; }
.esg-bell:focus-visible { outline: 2px solid #1E3ADA; outline-offset: 2px; }
html[data-theme="dark"] .esg-bell:focus-visible { outline-color: #8FA3FF; }
.esg-bell-icon { display: grid; place-items: center; }
.esg-bell .bellg { transform-origin: 12px 3px; }
.esg-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: #B3261E; color: #FFFFFF; font: 700 11px/18px "Plus Jakarta Sans", Inter, system-ui, sans-serif; text-align: center; padding: 0 4px; border: 2px solid #F4FAF6; box-sizing: content-box; }
html[data-theme="dark"] .esg-badge { border-color: #0E0E0E; }
.esg-bell.ring .bellg { animation: esg-ring 1.4s ease-in-out; }
.esg-bell.ring .esg-badge { animation: esg-pop .5s ease-out; }
@keyframes esg-ring { 0% { transform: rotate(0); } 8% { transform: rotate(20deg); } 18% { transform: rotate(-18deg); } 28% { transform: rotate(15deg); } 38% { transform: rotate(-12deg); } 48% { transform: rotate(8deg); } 58% { transform: rotate(-5deg); } 70% { transform: rotate(2.5deg); } 100% { transform: rotate(0); } }
@keyframes esg-pop { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.esg-npanel { position: fixed; right: 16px; top: 64px; width: 300px; max-width: calc(100vw - 32px); border: 1px solid; border-radius: 14px; padding: 12px 14px; box-shadow: 0 12px 30px rgba(0,0,0,.14); z-index: 50; font: 14px/1.45 "Plus Jakarta Sans", Inter, system-ui, sans-serif; }
@media (max-width: 600px) { .esg-npanel { right: 16px !important; left: 16px; width: auto; } }
.esg-npanel-head { display: flex; align-items: center; justify-content: space-between; }
.esg-npanel-all { all: unset; cursor: pointer; font-weight: 600; font-size: 13px; }
.esg-nitem { margin: 0; padding: 9px 0; border-top: 1px solid; font-size: 13.5px; }
.esg-nitem:first-of-type { margin-top: 8px; }
.esg-nitem em { display: block; font-style: normal; font-size: 12px; }

/* Motion gates */
html[data-anim="off"] .esg-sky .rays, html[data-anim="off"] .esg-sky .sunglow, html[data-anim="off"] .esg-sky .star,
html[data-anim="off"] #esg-bloom.go, html[data-anim="off"] .esg-bell.ring .bellg, html[data-anim="off"] .esg-bell.ring .esg-badge { animation: none; }
html[data-anim="off"] .esg-sky .body, html[data-anim="off"] .esg-sky .dayfade, html[data-anim="off"] .esg-sky .stars, html[data-anim="off"] .esg-sky .ground, html[data-anim="off"] .esg-sky svg { transition: none; }
html[data-tab-hidden] .esg-sky .rays, html[data-tab-hidden] .esg-sky .sunglow, html[data-tab-hidden] .esg-sky .star { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .esg-sky .rays, .esg-sky .sunglow, .esg-sky .star, #esg-bloom.go, .esg-bell.ring .bellg, .esg-bell.ring .esg-badge { animation: none; }
  .esg-sky .body, .esg-sky .dayfade, .esg-sky .stars, .esg-sky .ground, .esg-sky svg { transition: none; }
}

/* ===================================================================
   Dashboard reveal (approved preview). Plays once per mount: the board gets
   .play on its first data render and loses it ~3s later, so later data
   (filters, refocus) never re-animates; it only fades briefly.
   Transform / opacity / stroke-dashoffset only; no layout properties.
   =================================================================== */
@keyframes esg-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes esg-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes esg-sweep { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes esg-growy { from { transform: scaleY(0); } }
@keyframes esg-growx { from { transform: scaleX(0); } }
@keyframes esg-fadein { from { opacity: 0; } }
@keyframes esg-ringin { from { stroke-dasharray: 0 201; } }
@keyframes esg-pulse { 0% { box-shadow: 0 0 0 0 rgba(0,176,80,.55); } 100% { box-shadow: 0 0 0 9px rgba(0,176,80,0); } }
.esg-board.play .esg-card { animation: esg-rise .6s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: calc(var(--i, 0) * 55ms); }
.esg-board.play .esg-item { animation: esg-rise .5s ease backwards; animation-delay: calc(var(--j, 0) * 90ms + .35s); }
.esg-board.play .esg-spark { animation: esg-wipe 1.2s ease-out .4s backwards; }
.esg-board.play .esg-gy { transform-box: fill-box; transform-origin: 50% 100%; animation: esg-growy .8s cubic-bezier(.2,.7,.2,1) backwards; }
.esg-board.play .esg-gx { transform-box: fill-box; transform-origin: 0 50%; animation: esg-growx .8s cubic-bezier(.2,.7,.2,1) backwards; }
.esg-board.play .esg-bar { transform-origin: 0 50%; animation: esg-growx 1s ease-out .4s backwards; }
.esg-board.play .esg-arc { stroke-dasharray: 1; animation: esg-sweep 1.1s ease-out .3s backwards; }
.esg-board.play .esg-ln { stroke-dasharray: 1; animation: esg-sweep 1.6s ease-out .3s backwards; }
.esg-board.play .esg-dot { animation: esg-fadein .4s 1.4s backwards; }
.esg-board.play .esg-ringfill { animation: esg-ringin 1.3s ease-out .4s backwards; }
.esg-board { transition: opacity .2s ease; }
.esg-board.esg-refreshing { opacity: .6; }
.esg-live { animation: esg-pulse 1.8s infinite; }
html[data-tab-hidden] .esg-live { animation-play-state: paused; }
html[data-anim="off"] .esg-board *, html[data-anim="off"] .esg-board { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .esg-board *, .esg-board { animation: none !important; transition: none !important; } }

/* Empty-state chart outlines: very slow shimmer; off with motion off / reduced motion, paused in a hidden tab. */
@keyframes esg-ghost { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.esg-ghost { animation: esg-ghost 3.6s ease-in-out infinite; }
html[data-tab-hidden] .esg-ghost { animation-play-state: paused; }
html[data-anim="off"] .esg-ghost { animation: none; opacity: .8; }
@media (prefers-reduced-motion: reduce) { .esg-ghost { animation: none; opacity: .8; } }
