/* 05 Glass. A calm, Apple-like glass app. Dark is truly dark (near black, grey frosted glass, no colour washes);
   light is a soft neutral. One family (Geist) for text and figures, tabular figures for numbers. Every page fits the
   window: sizes follow the window height. Two opening pages: html[data-home="a"] (globe) and "b" (calculator). */
html[data-theme="dark"] {
  --bg: #050506; --ink: #f5f5f7; --ink2: #c7c7cc; --muted: #8e8e93; --faint: #48484a;
  --glass: rgb(28 28 32 / .58); --glass-hi: rgb(255 255 255 / .06); --edge: rgb(255 255 255 / .09); --edge-hi: rgb(255 255 255 / .16);
  --field: rgb(255 255 255 / .06); --field-hi: rgb(255 255 255 / .1); --line: rgb(255 255 255 / .08);
  --accent: #0a84ff; --good: #30d158; --bad: #ff453a; --warn: #ffd60a;
  --btn: #f5f5f7; --on-btn: #050506; --shadow: 0 30px 80px -40px rgb(0 0 0 / .9);
  --glow: radial-gradient(70vw 60vh at 50% -10%, rgb(255 255 255 / .07), transparent 70%), radial-gradient(50vw 50vh at 100% 110%, rgb(255 255 255 / .03), transparent 70%);
  --logo-filter: invert(1);
  --globe-a: #f5f5f7; --globe-b: #a1a1a6; --globe-c: #6e6e73; --globe-line: rgb(255 255 255 / .07);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f2f2f5; --ink: #1d1d1f; --ink2: #3a3a3c; --muted: #6e6e73; --faint: #c7c7cc;
  --glass: rgb(255 255 255 / .62); --glass-hi: rgb(255 255 255 / .9); --edge: rgb(255 255 255 / .9); --edge-hi: rgb(0 0 0 / .08);
  --field: rgb(0 0 0 / .045); --field-hi: rgb(0 0 0 / .07); --line: rgb(0 0 0 / .07);
  --accent: #007aff; --good: #1f9d47; --bad: #e0352b; --warn: #b58100;
  --btn: #1d1d1f; --on-btn: #fff; --shadow: 0 30px 70px -40px rgb(0 0 0 / .3);
  --glow: radial-gradient(70vw 60vh at 50% -10%, rgb(255 255 255 / .95), transparent 70%), radial-gradient(60vw 60vh at 100% 110%, rgb(210 214 230 / .6), transparent 70%);
  --logo-filter: none;
  --globe-a: #1d1d1f; --globe-b: #6e6e73; --globe-c: #aeaeb2; --globe-line: rgb(0 0 0 / .07);
  color-scheme: only light;
}
:root { --font: "Geist", system-ui, -apple-system, sans-serif; --display: var(--font); --body: var(--font); --num: var(--font); --radius: 22px; --barH: 64px; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--font); font-feature-settings: "tnum" 1; min-height: 100dvh; overflow-x: hidden; }
.backdrop { position: fixed; inset: 0; z-index: -1; background: var(--glow); pointer-events: none; }
.glass { background: var(--glass); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow); backdrop-filter: blur(30px) saturate(1.4); -webkit-backdrop-filter: blur(30px) saturate(1.4); }
::selection { background: var(--accent); color: #fff; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--edge-hi); background: var(--field); color: var(--ink); font: 500 15px var(--font); text-decoration: none; cursor: pointer; transition: background .2s, transform .2s; }
.btn:hover { background: var(--field-hi); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--btn); color: var(--on-btn); border-color: transparent; font-weight: 600; }
.btn.primary:hover { opacity: .9; }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; }

/* top bar */
.bar { position: fixed; z-index: 50; top: 12px; left: 50%; transform: translateX(-50%); width: min(1180px, calc(100vw - 24px)); height: 52px; display: flex; align-items: center; gap: 16px; padding: 0 8px 0 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--edge); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow); backdrop-filter: blur(30px) saturate(1.4); -webkit-backdrop-filter: blur(30px) saturate(1.4); }
.brand { display: flex; align-items: center; gap: 9px; font: 600 16px var(--font); letter-spacing: -0.01em; text-decoration: none; color: var(--ink); }
.brand img { width: 22px; height: 22px; filter: var(--logo-filter); }
.cats { display: flex; gap: 2px; margin: 0 auto; }
.cat { position: relative; }
.cat > button { height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: var(--ink2); font: 500 14px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.cat > button::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .55; transition: transform .2s; }
.cat > button:hover, .cat.open > button, .cat.here > button { color: var(--ink); background: var(--field); }
.menu { position: absolute; top: calc(100% + 12px); left: 50%; width: 320px; padding: 6px; display: grid; gap: 2px; border-radius: 18px; background: color-mix(in srgb, var(--bg) 94%, transparent); border: 1px solid var(--edge-hi); box-shadow: var(--shadow); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); opacity: 0; visibility: hidden; transform: translate(-50%, -4px); transition: opacity .18s, transform .22s cubic-bezier(.2,.8,.2,1), visibility 0s .22s; }
/* an invisible bridge over the gap, so the pointer can travel from the button to the menu */
.menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.cat.open .menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
@media (hover: hover) and (pointer: fine) { .cat:not(.hush):hover .menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; } .cat:not(.hush):hover > button::after { transform: translateY(1px) rotate(225deg); } }
.menu a { display: block; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.menu a:hover { background: var(--field); }
.menu a.on { background: var(--field-hi); }
.menu b { display: block; font-weight: 500; font-size: 14.5px; }
.menu span { display: block; margin-top: 1px; font-size: 13px; color: var(--muted); }
.bar-r { display: flex; align-items: center; gap: 8px; }
.mode { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--edge-hi); background: none; color: var(--ink2); cursor: pointer; display: grid; place-items: center; }
.mode:hover { background: var(--field); color: var(--ink); }
.mode .sun { display: none; } html[data-theme="dark"] .mode .sun { display: block; } html[data-theme="dark"] .mode .moon { display: none; }
.open { height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 10px; background: var(--btn); color: var(--on-btn); font: 600 14px var(--font); text-decoration: none; }

/* pages: one at a time, sized to the window */
.stage { padding-top: calc(var(--barH) + 14px); }
.view { display: none; width: min(1180px, calc(100vw - 24px)); margin: 0 auto; height: calc(100dvh - var(--barH) - 28px); min-height: 480px; }
.view.on { display: grid; grid-template-columns: minmax(260px, 330px) 1fr; gap: 16px; animation: enter .45s cubic-bezier(.2,.8,.2,1); }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }
::view-transition-old(root) { animation: .12s ease-in both vt-out; }
::view-transition-new(root) { animation: .26s cubic-bezier(.2,.8,.2,1) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: scale(.99); filter: blur(6px); } }
@keyframes vt-in { from { opacity: 0; transform: scale(1.01); filter: blur(6px); } }
.v-head { padding: 26px 6px 0 4px; }
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.v-head h2 { margin: 0; font: 600 clamp(26px, min(2.6vw, 4.6vh), 40px)/1.08 var(--font); letter-spacing: -0.035em; }
.v-head p { margin: 14px 0 18px; color: var(--ink2); font-size: 15px; line-height: 1.55; }
.v-head b { font-weight: 600; color: var(--ink); }
.v-tool { padding: clamp(16px, 2.6vh, 26px) clamp(18px, 2vw, 28px); overflow: auto; min-height: 0; align-self: start; max-height: 100%; }

/* shared parts, restyled */
.m-note { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.m-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--field); border: 0; }
.m-tabs button { height: 32px; padding: 0 14px; border-radius: 9px; font: 500 13.5px var(--font); color: var(--muted); }
.m-tabs button.on { background: var(--btn); color: var(--on-btn); box-shadow: none; }
.m-list { margin: 8px 0 0; border-top: 0; }
.m-row { grid-template-columns: 30px minmax(0, 1.7fr) 1fr 1fr 92px; padding: 0 10px; height: clamp(38px, 5.2vh, 46px); border-bottom: 1px solid var(--line); border-radius: 10px; }
.m-row:hover { background: var(--field); }
.m-rk { font: 500 13px var(--font); color: var(--muted); }
.m-pair { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-pair b { display: inline; font-weight: 600; margin-right: 8px; }
.m-pair small { display: inline; color: var(--muted); font-size: 12.5px; }
.m-val { font: 600 15px var(--font); }
.m-tvl { font-size: 14px; } .m-tvl small { font-size: 11px; }
.m-flag { font: 600 10.5px var(--font); letter-spacing: .04em; color: var(--warn); border-color: currentColor; }
.m-select { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
select { appearance: none; -webkit-appearance: none; height: 38px; padding: 0 36px 0 14px; border-radius: 12px; border: 1px solid var(--edge-hi); background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%238e8e93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; color: var(--ink); font: 500 14px var(--font); max-width: 100%; cursor: pointer; }
select:focus-visible, input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
select option { background: var(--bg); color: var(--ink); }
.m-select select, .m-cmp-pick select { margin: 0; }
.m-card-head { gap: 14px; margin-bottom: 12px; }
.m-card-head h3 { font: 600 24px var(--font); letter-spacing: -0.02em; }
.m-card-head small a { color: var(--accent); }
.m-logos img { width: 34px; height: 34px; border-color: var(--bg); }
.m-tier { font: 500 12px var(--font); border-radius: 999px; padding: 4px 10px; }
.m-tier.t-yellow { color: var(--warn); }
.m-spec { gap: 0 32px; margin-top: 12px; }
.m-spec div { padding: clamp(5px, 1vh, 9px) 0; font-size: 14px; border-bottom-color: var(--line); }
.m-spec dd { font-weight: 500; }
.m-cmp-pick { gap: 10px; margin-bottom: 10px; color: var(--muted); }
.m-cmp-row { padding: clamp(6px, 1.05vh, 10px) 0; border-bottom-color: var(--line); }
.m-cmp-row b { font-weight: 400; font-size: 13.5px; }
.m-cmp-row span { font: 600 16px var(--font); }
.m-cmp-row .win { color: var(--accent); }
.m-bins { height: min(46vh, 380px); gap: 4px; }
.m-bins i { --bin: var(--field-hi); --bin-hit: var(--accent); --bin-cur: var(--ink); border-radius: 6px 6px 3px 3px; }
.m-bins-key, .m-pulse-key { gap: 24px; font-size: 13.5px; }
.m-bins-key b, .m-pulse-key b { font-family: var(--font); font-weight: 600; }
.view[data-view="pulse"] .v-tool { display: grid; align-content: center; }
.m-pulse { gap: 22px; }
.m-pulse-dot { width: 12px; height: 12px; background: var(--good); }
.m-pulse-dot.beat::after { border-color: var(--good); }
.m-counter { font: 600 clamp(48px, min(6vw, 11vh), 92px)/1 var(--font); letter-spacing: -0.04em; }
.m-stats { gap: 12px; margin-top: 18px; }
.m-stats div { padding: 16px 18px; border-radius: 16px; background: var(--field); border: 0; }
.m-stats b { font: 600 clamp(22px, min(2.4vw, 4vh), 30px)/1.1 var(--font); letter-spacing: -0.02em; }
.m-stats small { font-size: 12.5px; }
.m-big { font: 600 clamp(56px, min(7vw, 12vh), 104px)/1 var(--font); letter-spacing: -0.045em; color: var(--good); }
.m-split { gap: 22px; margin-top: 10px; font-size: 14px; }
.m-split b { font-family: var(--font); font-weight: 600; }
.m-pnl-out { margin-top: clamp(14px, 3vh, 28px); }

/* sliders */
.m-slides { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.m-slide { display: block; }
.m-slide-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 13.5px; color: var(--muted); }
.m-slide output { font: 600 20px var(--font); color: var(--ink); letter-spacing: -0.01em; min-width: 0; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: none; cursor: pointer; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: var(--field-hi); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: var(--field-hi); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 8px rgb(0 0 0 / .35), 0 0 0 1px rgb(0 0 0 / .06); transition: transform .15s; }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 8px rgb(0 0 0 / .35); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.12); }
.m-stop-vis { margin-top: 22px; }
.m-track { position: relative; height: 8px; border-radius: 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--good) 70%, transparent), color-mix(in srgb, var(--bad) 70%, transparent)); }
.m-track i { position: absolute; top: -9px; width: 3px; height: 26px; border-radius: 2px; left: calc(var(--x, 0) * 100%); transition: left .1s; }
.m-stopline { background: var(--ink); }
.m-price { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.m-track-key { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
[data-part="stop"].is-out [data-out="state"] { color: var(--bad); }

/* home: the live counter and the $1,000 question on the first screen; version b adds the globe below, on scroll */
.view.home.on { display: block; height: auto; }
.home-center { position: relative; min-height: calc(100dvh - var(--barH) - 28px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: clamp(10px, 2.1vh, 22px); padding-bottom: 8px; }
.pill-live { display: inline-flex; align-items: center; gap: 10px; margin: 0; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--field); border: 1px solid var(--edge); font-size: 13px; color: var(--ink2); }
.pill-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); position: relative; }
.pill-live i.beat::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--good); animation: m-beat 1s ease-out forwards; }
.home-pulse { display: flex; flex-direction: column; align-items: center; }
.hp-counter { font: 600 clamp(56px, min(10vw, 12.5vh), 140px)/0.95 var(--font); letter-spacing: -0.055em; font-feature-settings: "tnum" 1; }
.hp-note { max-width: 34em; margin: clamp(6px, 1.3vh, 14px) 0 0; color: var(--muted); font-size: clamp(13.5px, 1.8vh, 15.5px); }
.home-go { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.home-calc { width: min(640px, 100%); padding: clamp(14px, 2.2vh, 22px) 24px; text-align: left; }
.hc-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: clamp(8px, 1.6vh, 14px); }
.hc-head > span { font: 600 17px var(--font); letter-spacing: -0.01em; }
.hc-head select { max-width: 260px; }
.hc-a { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-top: clamp(8px, 1.6vh, 16px); }
.hc-a b { font: 600 clamp(36px, min(4.6vw, 7vh), 60px)/1 var(--font); letter-spacing: -0.04em; color: var(--good); }
.hc-a span { color: var(--muted); font-size: 14px; }
.hc-a em { font-style: normal; font-weight: 600; color: var(--ink); }
.home-calc .m-note { margin-top: 8px; }
.home-down { display: none; position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; text-decoration: none; }
.home-down i { width: 9px; height: 9px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px) rotate(45deg); } }
.home-more { display: none; padding: 30px 0 40px; }
.home-more-head { text-align: center; max-width: 40em; margin: 0 auto 18px; }
.home-more-head h2 { margin: 0; font: 600 clamp(28px, 3vw, 40px)/1.1 var(--font); letter-spacing: -0.035em; }
.home-more-head p { margin: 10px 0 0; color: var(--ink2); }
.home-globe { position: relative; height: min(76vh, 700px); padding: 10px 10px 16px; display: flex; flex-direction: column; }
.home-globe .globe { flex: 1; width: 100%; min-height: 0; }
.home-globe .globe-key { font-size: 13px; color: var(--muted); }
.globe-key i { width: 8px; height: 8px; }
.neg { color: var(--bad) !important; }
html[data-home="b"] .home-down { display: flex; }
html[data-home="b"] .home-more { display: block; }

/* phones */
@media (max-width: 860px) {
  :root { --barH: 104px; }
  .bar { top: 8px; height: auto; flex-wrap: wrap; padding: 8px; gap: 6px; }
  .brand { padding-left: 6px; }
  .cats { order: 3; width: 100%; margin: 0; justify-content: space-between; }
  .cat { position: static; }
  .cat > button { padding: 0 9px; font-size: 13px; }
  .menu { left: 8px; right: 8px; width: auto; transform: translateY(-4px); }
  .cat.open .menu { transform: none; }
  .view { height: auto; min-height: calc(100dvh - var(--barH) - 28px); }
  .view.on { grid-template-columns: 1fr; gap: 6px; padding-bottom: 24px; }
  .view.home.on { padding-bottom: 0; }
  .v-head { padding: 14px 4px 0; }
  .v-head p { margin: 8px 0 12px; }
  .m-slides { grid-template-columns: 1fr; }
  .m-row { grid-template-columns: 24px minmax(0, 1.8fr) 1fr 70px; }
  .m-row .m-tvl { display: none; }
  .m-pair small { display: none; }
  .m-spec, .m-stats { grid-template-columns: 1fr; }
  .hc-head { flex-direction: column; align-items: stretch; }
  .hc-head select { max-width: none; width: 100%; }
  .hp-counter { font-size: 52px; }
  .home-center { justify-content: flex-start; padding-top: 12px; gap: 12px; }
  .home-calc { padding: 14px 16px; }
  .home-calc .m-slides { gap: 6px; }
  .home-go .btn { height: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===== 16 Nov, round 3: Inter, a light tint of colour, the pool picker, other pools, pages that fill the window ===== */
:root { --font: "Inter", system-ui, -apple-system, sans-serif; font-optical-sizing: auto; }
/* a 5 to 10 percent wash of colour in both themes: cool blue at the top, a little violet and mint low down */
html[data-theme="dark"] { --bg: #07080c; --glow: radial-gradient(80vw 60vh at 20% -10%, rgb(70 110 255 / .09), transparent 70%), radial-gradient(60vw 60vh at 100% 100%, rgb(150 90 255 / .07), transparent 70%), radial-gradient(50vw 50vh at 0% 100%, rgb(40 200 170 / .05), transparent 70%); }
html[data-theme="light"] { --bg: #f3f4f9; --glow: radial-gradient(80vw 60vh at 20% -10%, rgb(90 130 255 / .1), transparent 70%), radial-gradient(60vw 60vh at 100% 100%, rgb(170 120 255 / .08), transparent 70%), radial-gradient(50vw 50vh at 0% 100%, rgb(60 200 170 / .07), transparent 70%); }
.v-head h2, .hp-counter, .m-big, .hc-a b, .m-counter { letter-spacing: -0.035em; }

/* every tool panel fills the page height; its content spreads down it instead of piling up at the top */
.v-tool { align-self: stretch; max-height: none; display: flex; flex-direction: column; }
.v-tool > * { flex: none; }
[data-part="rank"] .m-list { flex: 1; display: flex; flex-direction: column; }
[data-part="rank"] .m-row { flex: 1; height: auto; min-height: 34px; }
[data-part="compare"] .m-cmp { flex: 1; display: flex; flex-direction: column; }
[data-part="compare"] .m-cmp-row { flex: 1; padding: 0; }
[data-part="card"] .m-spec { flex: 1; align-content: stretch; grid-auto-rows: 1fr; }
[data-part="card"] .m-spec div { align-items: center; padding: 0; }
[data-part="bins"] .m-bins { flex: 1; height: auto; max-height: none; min-height: 160px; }
.view[data-view="pulse"] .v-tool { justify-content: center; }
.m-others { margin-top: auto; padding-top: clamp(14px, 2.4vh, 26px); }
[data-part="pnl"] .m-pnl-out { margin-top: clamp(10px, 2.4vh, 26px); }

/* pool picker */
.pp { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 8px; border-radius: 14px; border: 1px solid var(--edge-hi); background: var(--field); color: var(--ink); cursor: pointer; font: inherit; text-align: left; max-width: 100%; transition: background .2s; }
.pp:hover { background: var(--field-hi); }
.pp-logos { display: inline-flex; flex: none; }
.pp-logos img, .pp-logos i { width: var(--s); height: var(--s); border-radius: 50%; background: var(--field-hi); border: 2px solid var(--bg); }
.pp-logos > * + * { margin-left: calc(var(--s) * -0.35); }
.pp-name { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.pp-name b { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-name small { font-size: 12px; color: var(--muted); }
.pp-chev { width: 7px; height: 7px; margin-left: 4px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-2px) rotate(45deg); flex: none; }
.pp-slot { margin-top: 4px; }
.pp-slot .pp { width: 100%; height: 52px; }
.pp-pop { position: fixed; z-index: 80; max-height: min(420px, 70vh); display: flex; flex-direction: column; padding: 8px; border-radius: 18px; background: color-mix(in srgb, var(--bg) 96%, transparent); border: 1px solid var(--edge-hi); box-shadow: 0 30px 70px -20px rgb(0 0 0 / .5); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); animation: pp-in .18s cubic-bezier(.2,.8,.2,1); }
@keyframes pp-in { from { opacity: 0; transform: translateY(-4px); } }
.pp-q { height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--edge-hi); background: var(--field); color: var(--ink); font: 400 14px var(--font); outline: none; margin-bottom: 6px; }
.pp-q:focus { border-color: var(--accent); }
.pp-list { overflow: auto; display: grid; gap: 1px; }
.pp-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); cursor: pointer; font: inherit; text-align: left; }
.pp-opt:hover { background: var(--field); }
.pp-opt.on { background: var(--field-hi); }
.pp-opt .pp-name { flex: 1; }
.pp-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; font-weight: 500; line-height: 1.2; }
.pp-meta small { color: var(--muted); font-size: 11.5px; font-weight: 400; }
.pp-none { margin: 12px; color: var(--muted); font-size: 14px; }
.m-cmp-pick { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 12px; }
.m-cmp-pick .pp { width: 100%; }
.hc-head .pp { max-width: 300px; }

/* other pools: five cards, each to use or to compare; compared pools as bars above them */
.o-title { margin: 0 0 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.o-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.o-card { display: flex; flex-direction: column; border-radius: 16px; background: var(--field); border: 1px solid var(--line); overflow: hidden; }
.o-use { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 12px 10px; border: 0; background: none; color: var(--ink); cursor: pointer; font: inherit; text-align: left; flex: 1; }
.o-use:hover { background: var(--field-hi); }
.o-pair { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; max-width: 100%; }
.o-pair b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-pair small { font-size: 11.5px; color: var(--muted); }
.o-val { font-size: 16px; font-weight: 600; color: var(--good); letter-spacing: -0.01em; }
.o-add { height: 32px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--accent); font: 500 12.5px var(--font); cursor: pointer; }
.o-add:hover { background: var(--field-hi); }
.o-add.on { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.o-cmp { margin-bottom: 14px; }
.o-bar { display: grid; grid-template-columns: minmax(210px, 1.3fr) 2fr 110px 24px; align-items: center; gap: 12px; height: 38px; padding: 0 8px; border-radius: 10px; }
.o-bar.main { background: var(--field); }
.o-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; }
.o-name b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-name small { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.o-track { height: 8px; border-radius: 8px; background: var(--field); overflow: hidden; }
.o-track i { display: block; height: 100%; border-radius: 8px; background: var(--good); transition: width .3s; }
.o-track i.neg-bg { background: var(--bad); }
.o-bar.main .o-track i { background: var(--accent); }
.o-v { font-size: 14px; font-weight: 600; text-align: right; color: var(--good); }
.o-x { width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--field-hi); color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }
@media (max-width: 1100px) { .o-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .o-card:nth-child(n+4) { display: none; } }
@media (max-width: 860px) {
  .v-tool { min-height: auto; }
  .o-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .o-card:nth-child(n+3) { display: flex; } .o-card:nth-child(n+5) { display: none; }
  .o-bar { grid-template-columns: minmax(0, 1.6fr) minmax(36px, .7fr) auto 24px; gap: 8px; padding: 0 6px; } .o-name .pp-logos { display: none; }
  .o-name small { display: none; }
  .m-cmp-pick { grid-template-columns: 1fr; } .m-cmp-pick > span { text-align: center; }
  [data-part="rank"] .m-row { min-height: 42px; }
}

/* short windows (1280x720): the other-pool cards and compare rows tighten so the page still fits */
@media (min-width: 861px) and (max-height: 780px) { .m-others { padding-top: 10px; } .o-title { margin-bottom: 6px; } .o-use { padding: 9px 10px 7px; gap: 5px; } .o-add { height: 28px; } .o-bar { height: 32px; } .o-cmp { margin-bottom: 8px; } }

/* the globe heading lands below the top bar after the scroll */
#globe { scroll-margin-top: calc(var(--barH) + 24px); }

/* ===== 17 Nov: steady theme switch, colour back, live dot, globe below the bar, five-pool compare, solid menus ===== */
/* theme switch: no page snapshot; the colours fade for a moment and nothing moves */
html.theming, html.theming *, html.theming *::before, html.theming *::after { transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease, fill .35s ease, stroke .35s ease !important; }
/* page change: only the new page fades in, briefly; the bar and the background never move */
.view.on { animation: page-in .26s cubic-bezier(.2,.8,.2,1); }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .view.on { animation: none; } }

/* colour: blue from the top, a warm red low on the right, a little violet; chains in their own colours on the globe */
html[data-theme="dark"] { --glow: radial-gradient(75vw 65vh at 12% -12%, rgb(56 110 255 / .2), transparent 70%), radial-gradient(60vw 60vh at 104% 104%, rgb(255 64 96 / .13), transparent 70%), radial-gradient(50vw 50vh at -4% 104%, rgb(130 90 255 / .1), transparent 70%); --globe-a: #6f9bff; --globe-b: #c3ef5c; --globe-c: #f5bd3a; --globe-line: rgb(140 170 255 / .12); }
html[data-theme="light"] { --glow: radial-gradient(75vw 65vh at 12% -12%, rgb(70 120 255 / .2), transparent 70%), radial-gradient(60vw 60vh at 104% 104%, rgb(255 80 110 / .13), transparent 70%), radial-gradient(50vw 50vh at -4% 104%, rgb(140 100 255 / .1), transparent 70%); --globe-a: #2f6bff; --globe-b: #4f9a12; --globe-c: #d18f00; --globe-line: rgb(40 80 200 / .12); }

/* menus and the pool list: solid, so the big numbers behind never show through */
html[data-theme="dark"] { --solid: #15161b; }
html[data-theme="light"] { --solid: #ffffff; }
.menu, .pp-pop { background: var(--solid); backdrop-filter: none; -webkit-backdrop-filter: none; }

/* live dot: a small steady light with a thin ring that keeps opening */
.pill-live { display: inline-block; line-height: 30px; gap: 0; }
.pill-live i { display: inline-block; vertical-align: middle; width: 7px; height: 7px; margin: -2px 9px 0 0; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px color-mix(in srgb, var(--good) 60%, transparent); position: relative; }
.pill-live i::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--good); animation: live-ping 2.2s cubic-bezier(0,0,.2,1) infinite; }
.pill-live i.beat::after { display: none; }
@keyframes live-ping { 0% { transform: scale(1); opacity: .5; } 75%, 100% { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pill-live i::before { animation: none; } }

/* version b: a scroll down settles the globe section fully below the bar */
html[data-home="b"] { scroll-snap-type: y proximity; }
html[data-home="b"] .home-more { scroll-snap-align: start; scroll-margin-top: calc(var(--barH) + 24px); }

/* compare: more than three pools go into two columns, so five fit without scrolling */
.o-cmp.many { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
.o-cmp.many .o-title { grid-column: 1 / -1; }
.o-cmp.many .o-bar { grid-template-columns: minmax(0, 1.3fr) minmax(36px, 1fr) auto 22px; height: 32px; gap: 8px; }
.o-cmp.many .o-name small { display: none; }
@media (max-width: 860px) { .o-cmp.many { grid-template-columns: 1fr; } }
/* whatever scrolls up under the floating bar blurs and fades out, so no half text shows above or around it */
body::before { content: ""; position: fixed; z-index: 40; left: 0; right: 0; top: 0; height: calc(var(--barH) + 22px); pointer-events: none; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: color-mix(in srgb, var(--bg) 55%, transparent); -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
/* alerts for the picked pool on Telegram (@MetricPoolBot), a quiet link under the picker */
.pp-watch { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; padding: 7px 12px 7px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--accent); text-decoration: none; background: color-mix(in srgb, var(--accent) 10%, transparent); transition: background .2s; }
.pp-watch:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
/* ===== 17 Nov, round 2 ===== */
/* page change without flicker: a fading parent breaks the glass blur of everything inside it for the length of the
   fade (the panels flash clear, then blurred). So the page itself never fades; each glass panel and heading fades on its own */
.view.on { animation: none; }
.view.on > .v-head, .view.on > .v-tool, .view.on .home-center > * { animation: page-in .24s cubic-bezier(.2,.8,.2,1) both; }
.view.on > .v-tool { animation-delay: .03s; }
@media (prefers-reduced-motion: reduce) { .view.on > .v-head, .view.on > .v-tool, .view.on .home-center > * { animation: none; } }

/* the calculator keeps its height when the pool or the sliders change: the answer, its parts and the note each keep their lines */
.hc-a { display: block; }
.hc-a b { display: block; font-variant-numeric: tabular-nums; }
.hc-a span { display: block; margin-top: 10px; line-height: 1.5; min-height: 3em; }
.home-calc .m-note, [data-part="pnl"] .m-note { line-height: 1.5; min-height: 4.5em; }
.m-big, .m-counter { font-variant-numeric: tabular-nums; }
[data-part="pnl"] .m-split { line-height: 1.5; min-height: 1.5em; }

/* version b: the page always comes to rest either on the first screen or on the globe with its heading below the bar */
html[data-home="b"] { scroll-snap-type: y mandatory; }
html[data-home="b"] .home-center { scroll-snap-align: start; scroll-margin-top: 400px; }

/* the alerts entry in the bar and its page */
.cat-link { height: 36px; padding: 0 14px; border-radius: 10px; color: var(--ink2); font: 500 14px var(--font); display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.cat-link svg { color: var(--accent); }
.cat-link:hover, .cat-link.on { color: var(--ink); background: var(--field); }
.m-alerts { display: flex; flex-direction: column; height: 100%; }
.m-alerts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; flex: 1; align-content: start; }
.m-alerts li { padding: 14px 16px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); }
.m-alerts li b { display: block; font-size: 15px; font-weight: 600; }
.m-alerts li span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.m-alerts li i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.m-alerts .go { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.m-alerts .go .btn-tg { display: inline-flex; align-items: center; gap: 9px; height: 48px; padding: 0 22px; border-radius: 14px; background: var(--accent); color: #fff; font: 600 15px var(--font); text-decoration: none; }
.m-alerts .go .btn-tg:hover { filter: brightness(1.08); }
.m-alerts .go small { color: var(--muted); font-size: 13px; }
@media (max-width: 860px) {
  .cat-link { padding: 0 9px; font-size: 13px; }
  .cat-link .long { display: none; }
  .m-alerts ul { grid-template-columns: 1fr; }
}@media (max-width: 860px) { .hc-a span { min-height: 4.5em; } .home-calc .m-note, [data-part="pnl"] .m-note { min-height: 6em; } [data-part="pnl"] .m-split { min-height: 3em; } }
/* alerts page: the Telegram conversation on the left, the triggers and the button on the right */
.al { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(16px, 2.4vw, 32px); height: 100%; min-height: 0; }
.al-chat { display: flex; flex-direction: column; min-height: 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%), radial-gradient(90% 70% at 100% 100%, color-mix(in srgb, var(--bad) 9%, transparent), transparent 60%), var(--field); }
.al-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--solid) 70%, transparent); }
.al-top b { display: block; font-size: 14.5px; font-weight: 600; }
.al-top small { display: block; font-size: 12px; color: var(--muted); }
.al-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); flex: none; }
.al-av img { width: 18px; height: 18px; filter: invert(1); }
html[data-theme="light"] .al-av img { filter: none; }
html[data-theme="light"] .al-av { background: #fff; border: 1px solid var(--line); }
.al-feed { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 16px; }
.al-msg { max-width: 82%; padding: 9px 12px 6px; border-radius: 16px; font-size: 14px; line-height: 1.45; position: relative; animation: al-in .4s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--d) * 220ms + 150ms); }
.al-msg p { margin: 0; }
.al-msg time { display: block; text-align: right; font-size: 11px; color: var(--muted); margin-top: 2px; }
.al-msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.al-msg.me time { color: rgb(255 255 255 / .75); }
.al-msg.bot { align-self: flex-start; background: var(--solid); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.al-msg .al-sub { margin-top: 6px; color: var(--muted); font-size: 13px; }
.al-msg.ex { opacity: .92; }
.al-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.al-dot.g { background: var(--good); } .al-dot.r { background: var(--bad); }
.al-day { align-self: center; margin: 4px 0; animation: al-in .4s both; animation-delay: calc(var(--d) * 220ms + 150ms); }
.al-day span { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500; color: var(--ink2); background: color-mix(in srgb, var(--solid) 80%, transparent); border: 1px solid var(--line); }
@keyframes al-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .al-msg, .al-day { animation: none; } }
.al-side { display: flex; flex-direction: column; min-height: 0; }
.al-h { margin: 2px 0 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.al-list { list-style: none; margin: 0; padding: 0; }
.al-list li { display: grid; grid-template-columns: 14px 1fr; column-gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.al-list li:last-child { border-bottom: 0; }
.al-list i { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; }
.al-list b { font-size: 14.5px; font-weight: 600; }
.al-list span { grid-column: 2; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.al-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.al-go { margin-top: auto; display: flex; align-items: center; justify-content: center; height: 50px; border-radius: 14px; background: var(--accent); color: #fff; font: 600 15px var(--font); text-decoration: none; box-shadow: 0 10px 30px -12px var(--accent); transition: filter .2s; }
.al-go:hover { filter: brightness(1.08); }
.al-small { margin-top: 8px; text-align: center; font-size: 12px; color: var(--muted); }
@media (max-height: 780px) and (min-width: 861px) { .al-list li { padding: 6px 0; } .al-list span { display: none; } }
@media (max-width: 860px) { .al { grid-template-columns: 1fr; height: auto; } .al-feed { overflow: visible; } .al-go { margin-top: 16px; } }
/* tier and price feed in colour (compare, pool card): green / yellow / red tiers; healthy green, paused dark red, other stops red */
.c-tier, .c-feed { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.c-tier::before, .c-feed::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.c-tier.t-green, .c-feed.f-ok { color: var(--good); }
.c-tier.t-yellow { color: var(--warn); }
.c-tier.t-red, .c-feed.f-down { color: var(--bad); }
.c-feed.f-paused { color: #b3261e; }
html[data-theme="dark"] .c-feed.f-paused { color: #d0453b; }
.c-tier.t-none, .c-feed.f-none { color: var(--muted); }
.c-tier.t-none::before, .c-feed.f-none::before { display: none; }
/* the bot's avatar in the chat preview: the logo on white in both themes */
.al-av, html[data-theme="light"] .al-av { background: #fff; border: 1px solid var(--line); }
.al-av img, html[data-theme="light"] .al-av img { filter: none; }/* the trigger list is a list of features, not states: plain dots in the text colour, no red or yellow */
.al-list i { background: var(--ink) !important; opacity: .55; }
/* before the first data: the boxes keep their size and shimmer softly, so the page never stands empty;
   the pill's dot is grey and slow until the numbers are live */
.pill-live.is-wait i, .pill-live.is-wait i::before { background: var(--muted); box-shadow: none; }
.pill-live.is-wait i::before { animation-duration: 1.4s; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
html:not(.m-ready) .home-pulse:empty, html:not(.m-ready) .home-calc:empty, html:not(.m-ready) .v-tool:empty {
  background-image: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--ink) 6%, transparent) 50%, transparent 70%);
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
html:not(.m-ready) .home-pulse:empty { width: min(420px, 80vw); height: clamp(110px, 16vh, 150px); border-radius: 22px; }
html:not(.m-ready) .home-calc:empty { min-height: clamp(260px, 38vh, 330px); }
html:not(.m-ready) .v-tool:empty { min-height: 60vh; }
@media (prefers-reduced-motion: reduce) { html:not(.m-ready) .home-pulse:empty, html:not(.m-ready) .home-calc:empty, html:not(.m-ready) .v-tool:empty { animation: none; } }/* a logo that did not load: an empty circle the size of the logo */
i.logo-miss { display: inline-block; width: var(--s, 22px); height: var(--s, 22px); border-radius: 50%; background: var(--field-hi); border: 2px solid var(--bg); }
.m-logos i.logo-miss { width: 34px; height: 34px; }