:root {
  color-scheme: dark;
  --bg: #0b1a13;
  --bg-2: #0e2119;
  --surface: #10241b;          /* chart surface: the palette is validated against it */
  --surface-2: #153024;
  --line: rgba(190, 240, 200, .10);
  --line-strong: rgba(190, 240, 200, .22);
  --text: #eaf5ec;
  --text-2: #a9c4b1;
  --text-3: #7a9784;
  --brand: #8be15b;            /* lime: buttons, accents (not a data color) */
  --brand-ink: #0b1a13;
  --series-new: #4fb85a;
  --series-closed: #9887ef;
  --radius: 20px;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(139, 225, 91, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(79, 184, 90, .08), transparent 60%),
    var(--bg);
  overflow-x: hidden;
}
a { color: inherit; }
b { font-weight: 600; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; }
h3 { font-size: 17px; font-weight: 500; }
main, .topbar, .footer { max-width: 1180px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ---------- pond background ---------- */
.pond { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.pad {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(79, 184, 90, .18), rgba(79, 184, 90, .05) 70%);
  border: 1px solid rgba(139, 225, 91, .08);
  animation: drift 40s ease-in-out infinite alternate;
}
.pad::after { /* the notch of a lily pad */
  content: ""; position: absolute; top: 50%; left: 50%; width: 52%; height: 14%;
  background: var(--bg); transform-origin: 0 50%; transform: rotate(-30deg); border-radius: 0 50% 50% 0;
  opacity: .9;
}
.pad-1 { width: 220px; height: 220px; top: 12%; right: -60px; }
.pad-2 { width: 140px; height: 140px; top: 58%; left: -40px; animation-duration: 55s; }
.pad-3 { width: 90px;  height: 90px;  top: 80%; right: 12%; animation-duration: 48s; }
.pad-4 { width: 60px;  height: 60px;  top: 32%; left: 8%; animation-duration: 36s; }
.pad-5 { width: 170px; height: 170px; top: 95%; left: 40%; animation-duration: 62s; }
@keyframes drift { to { transform: translate(30px, -24px) rotate(25deg); } }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 24px; text-decoration: none; display: flex; gap: 8px; align-items: center; }
.logo-mark { display: inline-block; transition: transform .3s; }
.logo:hover .logo-mark { transform: rotate(-15deg) scale(1.15); }
.topbar nav { display: flex; gap: 26px; align-items: center; font-size: 15px; }
.topbar nav a { text-decoration: none; color: var(--text-2); transition: color .2s; }
.topbar nav a:hover { color: var(--text); }
.topbar nav .topbar-cta { color: var(--brand); border: 1px solid rgba(139, 225, 91, .4); padding: 8px 16px; border-radius: 999px; }
.topbar nav .topbar-cta:hover { background: rgba(139, 225, 91, .1); color: var(--brand); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 56px 0 96px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2);
  background: rgba(139, 225, 91, .07); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; margin: 0 0 24px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 rgba(139, 225, 91, .6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 10px rgba(139, 225, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(139, 225, 91, 0); } }
h1 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 800; }
.accent { color: var(--brand); }
.lead { font-size: 19px; color: var(--text-2); max-width: 580px; margin: 24px 0 32px; }
.lead b { color: var(--text); }
.cta-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 18px;
  padding: 18px 30px; border-radius: 999px;
  box-shadow: 0 10px 40px -10px rgba(139, 225, 91, .6), inset 0 -3px 0 rgba(0, 0, 0, .15);
  transition: transform .15s, box-shadow .2s;
}
.cta svg { width: 22px; height: 22px; fill: currentColor; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -10px rgba(139, 225, 91, .75), inset 0 -3px 0 rgba(0, 0, 0, .15); }
.cta:active { transform: translateY(1px); }
.cta-handle { color: var(--text-3); font-size: 15px; }
.cta-handle b { color: var(--text-2); }
.hero-facts { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--text-3); font-size: 15px; }
.hero-facts li::before { content: "🪷 "; }
.hero-facts b { color: var(--text-2); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 500; }

.hero-art { position: relative; display: flex; justify-content: flex-start; align-items: flex-start; min-height: 420px; }
.frog { position: relative; background: none; border: 0; padding: 0; cursor: pointer; width: min(340px, 90%); margin-top: 20px; }
.frog-svg { width: 100%; display: block; position: relative; z-index: 1; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .35)); transition: transform .2s; }
.frog:hover .frog-svg { transform: translateY(-4px); }
.frog.jump .frog-svg { animation: hop .55s cubic-bezier(.3, .7, .4, 1); }
@keyframes hop { 30% { transform: translateY(-38px) scaleY(1.05); } 60% { transform: translateY(0) scaleY(.93); } 100% { transform: none; } }
.frog-pad { fill: #1f5a37; }
.frog-body { fill: #6cc24a; }
.frog-belly { fill: #a7e07e; }
.eye-white { fill: #fff; }
.pupil { fill: #0b1a13; }
.glint { fill: #fff; }
.mouth { fill: none; stroke: #234d24; stroke-width: 5; stroke-linecap: round; }
.cheek { fill: #ff9e9e; opacity: .45; }
.eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.eye-r { animation-delay: .05s; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.ripple { position: absolute; left: 50%; bottom: 4%; width: 90%; height: 22%; border: 2px solid rgba(139, 225, 91, .35);
  border-radius: 50%; transform: translateX(-50%) scale(.6); opacity: 0; animation: ripple 4.5s infinite; }
.r2 { animation-delay: 1.5s; } .r3 { animation-delay: 3s; }
@keyframes ripple { 0% { opacity: .9; transform: translateX(-50%) scale(.6); } 100% { opacity: 0; transform: translateX(-50%) scale(1.7); } }
.bubble { position: absolute; top: -6px; right: -12px; z-index: 2; background: #fff; color: var(--brand-ink); font-family: var(--font-display);
  font-weight: 700; padding: 10px 16px; border-radius: 18px 18px 18px 4px; opacity: 0; transform: scale(.6) translateY(10px); transition: .25s; pointer-events: none; }
.frog.talk .bubble { opacity: 1; transform: none; }

.notif { position: absolute; right: 0; bottom: -10px; width: 290px; z-index: 2;
  background: rgba(21, 48, 36, .85); backdrop-filter: blur(12px); border: 1px solid var(--line-strong);
  border-radius: 16px; padding: 14px 16px; font-size: 13px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
  animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.notif-head { display: flex; justify-content: space-between; color: var(--text-3); margin-bottom: 6px; }
.notif-head span { color: var(--text); font-weight: 600; }
.notif-body { display: flex; flex-direction: column; gap: 3px; color: var(--text-2); }
.notif-body b { color: var(--text); }
.notif-body span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- how ---------- */
.how { padding: 40px 0 100px; }
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps li { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: relative; overflow: hidden; }
.steps li::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%; background: rgba(139, 225, 91, .05); }
.step-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(139, 225, 91, .12);
  color: var(--brand); font-family: var(--font-display); font-weight: 700; margin-bottom: 18px; }
.steps h3 { font-size: 19px; margin-bottom: 10px; }
.steps p { color: var(--text-2); margin: 0; }

/* ---------- stats ---------- */
.pulse { padding: 20px 0 80px; }
.pulse-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.pulse-sub { color: var(--text-3); margin: 0; font-size: 15px; }
.pulse-sub .demo-badge { color: var(--brand-ink); background: #f2c14e; border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 700; margin-right: 6px; }
.stats-error { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--text-2); }
.ghost-btn { background: none; color: var(--brand); border: 1px solid rgba(139, 225, 91, .4); border-radius: 999px; padding: 10px 18px; font: inherit; cursor: pointer; }
.ghost-btn:hover { background: rgba(139, 225, 91, .08); }
.stats { display: flex; flex-direction: column; gap: 20px; }
.stats[data-state="loading"] .card, .stats[data-state="loading"] .kpi { animation: shimmer 1.4s infinite; }
.stats[data-state="error"] { display: none; }
@keyframes shimmer { 50% { opacity: .55; } }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; display: flex; flex-direction: column; gap: 4px; }
.kpi-label { color: var(--text-2); font-size: 14px; }
.kpi-value { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 4vw, 48px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: .45em; font-weight: 500; color: var(--text-2); margin-left: 4px; }
.kpi-note { color: var(--text-3); font-size: 13px; min-height: 1.2em; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.card-sub { color: var(--text-3); font-size: 14px; margin: 4px 0 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-2-uneven { grid-template-columns: 1.25fr 1fr; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.legend { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; color: var(--text-2); font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw-new { background: var(--series-new); }
.sw-closed { background: var(--series-closed); }

.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: var(--line-strong); stroke-width: 1; }
.chart .axis { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .lbl { fill: var(--text-2); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .bar-new { fill: var(--series-new); }
.chart .bar-closed { fill: var(--series-closed); }
.chart .bar-life { fill: var(--series-new); }
.chart .hit { fill: transparent; cursor: default; }
.chart .col:hover .hit { fill: rgba(190, 240, 200, .06); }
.chart rect.bar-new, .chart rect.bar-closed, .chart rect.bar-life { transform-box: fill-box; transition: opacity .15s; }
.chart.dim .col:not(:hover) rect:not(.hit) { opacity: .45; }

.as-table { margin-top: 12px; color: var(--text-3); font-size: 13px; }
.as-table summary { cursor: pointer; width: max-content; }
.as-table table { margin-top: 10px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.as-table td, .as-table th { padding: 3px 14px 3px 0; text-align: left; font-weight: 400; }
.as-table th { color: var(--text-2); }

.heatmap { display: grid; grid-template-columns: 26px repeat(24, 1fr); gap: 3px; font-size: 11px; color: var(--text-3); }
.heatmap .cell { aspect-ratio: 1; border-radius: 3px; background: var(--c, #142c21); transition: transform .12s; min-width: 0; }
.heatmap .cell:hover { transform: scale(1.35); outline: 2px solid var(--surface); position: relative; z-index: 1; }
.heatmap .day { align-self: center; }
.heatmap .hour { text-align: center; white-space: nowrap; overflow: visible; }
.heat-scale { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12px; margin-top: 12px; justify-content: flex-end; }
.heat-scale i { width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #17382a, #2f7a4c, #4fae5f, #8be15b); }

.insight { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(139, 225, 91, .07); color: var(--text-2); font-size: 14px; }
.insight b { color: var(--text); }

.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 40%) 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.bar-row .name { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .track { height: 10px; background: rgba(190, 240, 200, .06); border-radius: 0 5px 5px 0; overflow: hidden; }
.bar-row .fill { display: block; height: 100%; width: var(--w); background: var(--series-new); border-radius: 0 4px 4px 0; transform-origin: left; animation: grow .9s cubic-bezier(.2, .7, .2, 1) both; }
.bar-row .val { color: var(--text); font-variant-numeric: tabular-nums; min-width: 4.2em; text-align: right; }
.bar-row .val small { color: var(--text-3); margin-left: 4px; }
@keyframes grow { from { transform: scaleX(0); } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 14px; font-size: 14px;
  display: inline-flex; gap: 8px; align-items: baseline; background: var(--surface); }
.chip::before { content: ""; position: absolute; inset: 0; width: var(--w); background: rgba(79, 184, 90, .22); z-index: 0; }
.chip > * { position: relative; z-index: 1; }
.chip b { font-weight: 600; }
.chip span { color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 13px; }
.chip.top { border-color: rgba(139, 225, 91, .55); }

.table-wrap { overflow-x: auto; }
.companies { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.companies th { text-align: right; color: var(--text-3); font-weight: 500; padding: 0 8px 10px; cursor: pointer; user-select: none; white-space: nowrap; }
.companies th:first-child { text-align: left; padding-left: 0; }
.companies th[aria-sort]::after { content: " ↓"; color: var(--brand); }
.companies th:hover { color: var(--text); }
.companies td { padding: 9px 8px; border-top: 1px solid var(--line); text-align: right; }
.companies td:first-child { text-align: left; padding-left: 0; }
.companies .cname { font-weight: 600; }
.companies .cdomain { color: var(--text-3); font-size: 12px; margin-left: 6px; text-transform: lowercase; }
.companies .minibar { display: inline-block; height: 6px; border-radius: 0 3px 3px 0; background: var(--series-new); vertical-align: middle; margin-right: 8px; }
.companies .plus { color: var(--brand); }
.companies .zero-val { color: var(--text-3); }

.latest { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.latest li + li { border-top: 1px solid var(--line); }
.latest a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; text-decoration: none; }
.latest a:hover .lt-title { color: var(--brand); }
.lt-title { font-weight: 600; transition: color .15s; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-meta { color: var(--text-3); font-size: 13px; grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-time { color: var(--text-3); font-size: 12px; grid-row: 1 / span 2; grid-column: 2; align-self: center; white-space: nowrap; }
.empty { color: var(--text-3); font-size: 14px; }

/* ---------- final ---------- */
.final { text-align: center; padding: 80px 24px 100px; margin: 20px 0 0; border-radius: 32px;
  background: radial-gradient(600px 300px at 50% 0%, rgba(139, 225, 91, .14), transparent 70%), var(--bg-2); border: 1px solid var(--line); }
.final p { color: var(--text-2); font-size: 18px; margin: 16px 0 32px; }

.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-3); font-size: 13px; padding-top: 32px; padding-bottom: 40px; }

.tooltip { position: fixed; z-index: 50; pointer-events: none; background: #0a1611; border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 8px 12px; font-size: 13px; color: var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); max-width: 260px; }
.tooltip .tt-title { color: var(--text-2); margin-bottom: 2px; }
.tooltip .tt-row { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { padding-top: 24px; }
  .hero-art { min-height: 340px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-2-uneven, .grid-3, .steps, .hero { grid-template-columns: minmax(0, 1fr); }
  .topbar nav a:not(.topbar-cta) { display: none; }
}
@media (max-width: 520px) {
  main, .topbar, .footer { padding-left: 16px; padding-right: 16px; }
  .kpi { padding: 18px; }
  .card { padding: 18px; }
  .cta { width: 100%; justify-content: center; }
  .notif { left: 0; width: 260px; }
  .heatmap { gap: 2px; grid-template-columns: 22px repeat(24, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@media (forced-colors: active) {
  .bar-row .fill, .chart rect { forced-color-adjust: none; }
}
.card-foot { margin: 14px 0 0; color: var(--text-3); font-size: 13px; }
.i18n-pending body { visibility: hidden; }
.lang-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px; }
.lang-switch button { background: none; border: 0; color: var(--text-3); font: 600 12px var(--font); padding: 5px 9px; border-radius: 999px; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: rgba(139, 225, 91, .14); color: var(--brand); }
.lang-switch button:hover { color: var(--text); }
