/* =====================================================================
   STYKE — base styles shared by every page
   Palette comes from the logo: lime #ABF705 -> green #22E347 -> mint #00D882,
   on black and graphite.
   ===================================================================== */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;

  --bg: #050706;
  --bg-2: #090c0b;
  --surface: #0e1211;
  --surface-2: #131817;
  --surface-3: #1a201e;
  --surface-4: #222927;
  --line: #1c2321;
  --line-2: #29312e;
  --line-3: #36403c;

  --text: #eef3f0;
  --text-2: #a7b1ac;
  --text-3: #707b76;
  --text-4: #4d5652;

  --lime: #abf705;
  --green: #22e347;
  --mint: #00d882;
  --accent: #2de35d;
  --accent-hover: #4ff07a;
  --accent-ink: #03140a;
  --accent-soft: rgba(45, 227, 93, .12);
  --accent-line: rgba(45, 227, 93, .35);
  --grad: linear-gradient(180deg, #abf705 0%, #36ea3f 52%, #00d882 100%);
  --grad-h: linear-gradient(90deg, #abf705 0%, #36ea3f 50%, #00d882 100%);

  --danger: #ff5d5d;
  --danger-soft: rgba(255, 93, 93, .12);
  --warning: #f3b64a;
  --warning-soft: rgba(243, 182, 74, .12);
  --info: #6cb8ff;
  --info-soft: rgba(108, 184, 255, .12);

  --r-xs: 4px;
  --r-s: 6px;
  --r: 10px;
  --r-l: 14px;
  --r-xl: 20px;
  --cut: 10px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  --shadow-1: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px -16px rgba(0, 0, 0, .8);
  --shadow-2: 0 24px 64px -24px rgba(0, 0, 0, .9);

  --wrap: 1200px;
  --gutter: 20px;
  --nav-h: 68px;

  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", monospace;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
input, select, textarea { margin: 0; }
h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
p { text-wrap: pretty; } /* no single word left alone on the last line */
ul, ol { padding: 0; list-style: none; }
table { border-collapse: collapse; border-spacing: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* ---------- type ---------- */
.display, h1, h2, h3 { font-stretch: 112%; letter-spacing: -.022em; line-height: 1.02; font-weight: 700; text-wrap: balance; }
.h1 { font-size: clamp(2.5rem, 1.6rem + 4.6vw, 5.4rem); }
.h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem); }
.h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); line-height: 1.12; }
.h4 { font-size: 1.125rem; line-height: 1.3; letter-spacing: -.01em; font-stretch: 108%; font-weight: 650; }
.lead { font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); color: var(--text-2); line-height: 1.6; max-width: 38em; text-wrap: pretty; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.small { font-size: .875rem; }
.xs { font-size: .75rem; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: 0; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.label {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  font-stretch: 118%; color: var(--text-3);
}
.label::before {
  content: ""; width: 14px; height: 2px; background: var(--grad-h);
  transform: skewX(-45deg);
}
.label--plain::before { display: none; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.stack > * + * { margin-top: var(--stack, 1rem); }
.row { display: flex; align-items: center; gap: var(--gap, .75rem); }
.row--wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- icons ---------- */
.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i--sm { width: 1em; height: 1em; }
.i--lg { width: 1.5em; height: 1.5em; }
.i--bold { stroke-width: 2.4; }

/* ---------- buttons ---------- */
.btn {
  --h: 44px;
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  height: var(--h); padding: 0 1.25em;
  border-radius: var(--r-s);
  font-weight: 600; font-size: .95rem; font-stretch: 106%; letter-spacing: .005em; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), opacity .2s;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-busy, .btn.is-disabled, .btn[aria-disabled="true"] { pointer-events: none; opacity: .55; }
.btn .i { transition: transform .25s var(--ease-out); }
.btn:hover .i--nudge { transform: translateX(3px); }
.btn:hover .i--nudge-up { transform: translate(2px, -2px); }

/* Primary: solid logo green with the logo's diagonal cut on two corners. */
.btn--primary {
  background: var(--accent); color: var(--accent-ink);
  border-radius: 0;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  overflow: hidden;
}
.btn--primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary:hover::after { transform: translateX(120%); transition: transform .7s var(--ease-out); }
.btn--primary:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent-ink), inset 0 0 0 4px #fff; }

.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-3); }
.btn--ghost:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--text-4); }
.btn--soft { background: var(--surface-3); color: var(--text); }
.btn--soft:hover { background: var(--surface-4); }
.btn--quiet { background: transparent; color: var(--text-2); padding-inline: .6em; }
.btn--quiet:hover { color: var(--text); background: var(--surface-2); }
.btn--danger { background: var(--danger-soft); color: #ff8a8a; box-shadow: inset 0 0 0 1px rgba(255, 93, 93, .3); }
.btn--danger:hover { background: rgba(255, 93, 93, .2); }
.btn--sm { --h: 34px; padding: 0 .85em; font-size: .85rem; }
.btn--lg { --h: 54px; padding: 0 1.6em; font-size: 1.02rem; --cut: 12px; }
.btn--block { width: 100%; }
.btn--icon { width: var(--h); padding: 0; }

.btn .spin { display: none; }
.btn.is-busy .spin { display: block; }
.btn.is-busy .btn__label, .btn.is-busy > .i { opacity: 0; }
.btn.is-busy .spin { position: absolute; inset: 0; margin: auto; }

.spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link { color: var(--accent); font-weight: 500; text-underline-offset: 3px; }
.link:hover { text-decoration: underline; }
.link--quiet { color: var(--text-2); }
.link--quiet:hover { color: var(--text); }

/* ---------- forms ---------- */
.field { display: grid; gap: .45rem; }
.field__label { font-size: .85rem; font-weight: 600; color: var(--text-2); font-stretch: 104%; display: flex; justify-content: space-between; gap: 1rem; }
.field__hint { font-size: .8rem; color: var(--text-3); line-height: 1.45; }
.field__error { font-size: .82rem; color: #ff8080; line-height: 1.4; display: flex; gap: .4em; align-items: flex-start; }
.field__error:empty { display: none; }
.input, .select, .textarea {
  width: 100%; min-height: 48px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-s);
  color: var(--text);
  font-size: 1rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.textarea { padding: 12px 14px; min-height: 96px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface-2); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: rgba(255, 93, 93, .7); box-shadow: 0 0 0 3px var(--danger-soft); }
.input--sm, .select--sm { min-height: 36px; font-size: .9rem; padding: 0 10px; }
.input:disabled { opacity: .6; }
.select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a7b1ac' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.select option { background: var(--surface-2); color: var(--text); }
.input-group { position: relative; display: flex; align-items: stretch; }
.input-group .input { flex: 1; }
.input-group__btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: var(--r-s);
  display: grid; place-items: center; color: var(--text-3);
}
.input-group__btn:hover { color: var(--text); background: var(--surface-3); }
.input-group .input { padding-right: 48px; }

.check { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; font-size: .92rem; color: var(--text-2); line-height: 1.5; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__box {
  flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 5px;
  border: 1.5px solid var(--line-3); background: var(--surface);
  display: grid; place-items: center; transition: all .2s var(--ease);
}
.check__box .i { width: 14px; height: 14px; stroke-width: 3; color: var(--accent-ink); opacity: 0; transform: scale(.6); transition: all .2s var(--ease-out); }
.check input:checked + .check__box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check__box .i { opacity: 1; transform: none; }
.check input:focus-visible + .check__box { outline: 2px solid var(--accent); outline-offset: 2px; }

/* switch */
.switch { position: relative; display: inline-flex; width: 40px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch__track { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-4); transition: background .25s var(--ease); box-shadow: inset 0 0 0 1px var(--line-3); }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform .3s var(--ease-out), background .25s; }
.switch input:checked + .switch__track { background: var(--accent); box-shadow: none; }
.switch input:checked + .switch__track::after { transform: translateX(16px); background: var(--accent-ink); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* segmented control with sliding thumb */
.seg {
  position: relative; display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface); border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line-2);
}
.seg__thumb {
  position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 7px;
  background: var(--surface-4); box-shadow: 0 1px 2px rgba(0, 0, 0, .4), inset 0 0 0 1px var(--line-3);
  transition: transform .35s var(--ease-out), width .35s var(--ease-out);
}
.seg button {
  position: relative; z-index: 1; height: 32px; padding: 0 .9rem; border-radius: 7px;
  font-size: .85rem; font-weight: 600; color: var(--text-3); transition: color .2s;
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
}
.seg button[aria-pressed="true"] { color: var(--text); }
.seg button:hover { color: var(--text-2); }
.seg button[aria-pressed="true"]:hover { color: var(--text); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.card--pad { padding: 20px; }
@media (min-width: 768px) { .card--pad { padding: 24px; } }

.badge {
  display: inline-flex; align-items: center; gap: .4em; height: 24px; padding: 0 .6em;
  border-radius: 99px; font-size: .75rem; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--plain::before { display: none; }
.badge--green { background: var(--accent-soft); color: var(--accent); }
.badge--amber { background: var(--warning-soft); color: var(--warning); }
.badge--red { background: var(--danger-soft); color: #ff8080; }
.badge--blue { background: var(--info-soft); color: var(--info); }
.badge--grey { background: var(--surface-3); color: var(--text-3); }

.kbd { font-family: var(--mono); font-size: .75rem; padding: .1em .45em; border-radius: 4px; background: var(--surface-3); color: var(--text-2); box-shadow: inset 0 -1px 0 var(--line-3); }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; height: 30px; }
.logo svg { height: 100%; width: auto; }
.logo-mark { width: 32px; height: auto; }

/* ---------- language links (footer of every page, dashboard menu) ---------- */
.langs { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: .82rem; line-height: 1.2; }
.langs > .i { width: 15px; height: 15px; margin-right: 4px; color: var(--text-4); }
.langs a { padding: 5px 9px; border-radius: 999px; color: var(--text-3); text-decoration: none; transition: color .2s, background-color .2s; }
.langs a:hover { color: var(--text); background: var(--surface-2); }
.langs a[aria-current] { color: var(--text); background: var(--surface-3); }

/* ---------- toasts ---------- */
.toasts {
  position: fixed; z-index: 1000; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: grid; gap: 8px; width: min(420px, calc(100vw - 24px)); pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: .7rem;
  padding: 12px 14px; border-radius: var(--r);
  background: var(--surface-3); border: 1px solid var(--line-3);
  box-shadow: var(--shadow-2);
  font-size: .92rem; line-height: 1.45;
  animation: toast-in .45s var(--ease-out) both;
}
.toast.is-out { animation: toast-out .3s var(--ease) both; }
.toast .i { margin-top: 1px; }
.toast--ok .i { color: var(--accent); }
.toast--err .i { color: var(--danger); }
.toast--warn .i { color: var(--warning); }
.toast__close { margin-left: auto; color: var(--text-3); padding: 2px; border-radius: 4px; }
.toast__close:hover { color: var(--text); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ---------- "new version" card (lib/version.js) ---------- */
.upd {
  position: fixed; z-index: 950; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px);
  padding: 8px 8px 8px 14px; border-radius: var(--r);
  background: var(--surface-3); border: 1px solid var(--line-3); box-shadow: var(--shadow-2);
  font-size: .9rem; line-height: 1.35;
  animation: toast-in .45s var(--ease-out) both;
}
.upd > .i { color: var(--accent); }
.upd__text { min-width: 0; }
.upd__close { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 6px; color: var(--text-3); }
.upd__close:hover { color: var(--text); background: var(--surface-4); }

/* ---------- dialog ---------- */
.dialog {
  border: 0; padding: 0; margin: auto; max-width: min(520px, calc(100vw - 24px)); width: 100%;
  background: var(--surface); color: var(--text);
  border-radius: var(--r-l); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-2);
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
}
.dialog--wide { max-width: min(760px, calc(100vw - 24px)); }
.dialog[open] { animation: dlg-in .35s var(--ease-out); }
.dialog::backdrop { background: rgba(2, 4, 3, .72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade-in .25s var(--ease); }
.dialog__head { display: flex; align-items: flex-start; gap: 1rem; padding: 20px 20px 0; }
.dialog__title { font-size: 1.2rem; font-stretch: 110%; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.dialog__close { margin-left: auto; margin-top: -4px; margin-right: -6px; }
.dialog__body { padding: 16px 20px; display: grid; gap: 16px; }
.dialog__foot { padding: 4px 20px 20px; display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 480px) { .dialog__foot .btn { flex: 1; } }
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- skeleton ---------- */
.skel { position: relative; overflow: hidden; background: var(--surface-3); border-radius: 6px; color: transparent !important; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- charts ---------- */
.viz { position: relative; }
.viz-svg { display: block; overflow: visible; touch-action: pan-y; }
.viz-svg:focus { outline: none; }
.viz-svg:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 4px; border-radius: 4px; }
.viz-axis { font-size: 11px; fill: var(--text-3); font-family: var(--font); font-variant-numeric: tabular-nums; }
.viz-grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.viz-base { stroke: var(--line-3); stroke-width: 1; shape-rendering: crispEdges; }
.viz-label { font-size: 13px; font-weight: 650; fill: var(--text); font-family: var(--font); }
.viz-cross { stroke: var(--text-4); stroke-width: 1; shape-rendering: crispEdges; }
.viz-hover { opacity: 0; transition: opacity .15s; pointer-events: none; }
.viz-hover.is-on { opacity: 1; }
.viz-col { fill: #3a7a4d; transition: fill .2s; }
.viz-col--em { fill: var(--accent); }
.viz-colg.is-hover .viz-col { fill: #4a9660; }
.viz-colg.is-hover .viz-col--em { fill: var(--accent-hover); }
.viz-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 110px; max-width: 240px;
  padding: 8px 10px; border-radius: 8px; background: var(--surface-4); box-shadow: 0 0 0 1px var(--line-3), var(--shadow-2);
  font-size: .78rem; line-height: 1.35; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s;
}
.viz-tip.is-on { opacity: 1; transform: none; }
.viz-tip strong { display: block; font-size: .95rem; font-weight: 700; color: var(--text); }
.viz-tip span { color: var(--text-3); }
.viz-empty { height: 100%; min-height: 120px; display: grid; place-items: center; color: var(--text-3); font-size: .9rem; text-align: center; padding: 16px; }

.barlist { display: grid; gap: 14px; }
.barlist__top { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; margin-bottom: 6px; }
.barlist__label { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barlist__value { font-weight: 650; font-variant-numeric: tabular-nums; }
.barlist__track { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.barlist__fill { display: block; height: 100%; width: var(--w); border-radius: 0 4px 4px 0; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease-out); transition-delay: calc(var(--i) * 60ms); }
.barlist.is-in .barlist__fill { transform: none; }
.barlist__meta { margin-top: 5px; font-size: .75rem; color: var(--text-3); }

.funnel { display: grid; gap: 16px; }
.funnel__head { display: flex; align-items: baseline; gap: 10px; font-size: .88rem; margin-bottom: 7px; }
.funnel__label { color: var(--text-2); }
.funnel__value { font-weight: 700; font-variant-numeric: tabular-nums; margin-left: auto; }
.funnel__conv { font-size: .75rem; color: var(--text-3); min-width: 48px; text-align: right; font-variant-numeric: tabular-nums; }
.funnel__track { height: 12px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.funnel__bar { display: block; height: 100%; width: var(--w); border-radius: 0 3px 3px 0; transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease-out); }
.funnel.is-in .funnel__bar { transform: none; }
.funnel__bar--0 { background: #2f6b43; }
.funnel__bar--1 { background: #2f9150; transition-delay: .08s; }
.funnel__bar--2 { background: #2bbb58; transition-delay: .16s; }
.funnel__bar--3 { background: #3de46b; transition-delay: .24s; }

/* ---------- demo banner ---------- */
.demo-flag {
  position: fixed; z-index: 900; right: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 6px 10px; border-radius: 99px;
  background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(243, 182, 74, .35);
  font-size: .75rem; font-weight: 600; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
