/* ============================================================
   Researchly legal/support subpages
   Uses the same Onyx shell as the Researchly landing page.
   ============================================================ */

:root {
  --r-card: 22px;
  --r-group: 16px;
  --r-control: 12px;
  --r-pill: 999px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif;
  --font-mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 1140px;
  --brand-blue: #2070DF;
  --brand-blue-soft: #5E97EA;
  --brand-coral: #E84E46;
}

html[data-theme="light"] {
  --canvas: #ffffff;
  --canvas-2: #f7f7f8;
  --surface: #efeff1;
  --surface-2: #e6e6e9;
  --surface-3: #dcdce0;
  --sep: rgba(122,122,122,.16);
  --sep-2: rgba(0,0,0,.06);
  --label: #000000;
  --label-2: rgba(20,20,25,.62);
  --label-3: rgba(20,20,25,.34);
  --accent: #0a0a0c;
  --accent-press: #242429;
  --on-accent: #ffffff;
  --glass-border: rgba(0,0,0,.10);
  --glass-hi: rgba(255,255,255,.72);
  --shadow-1: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
  --shadow-2: 0 2px 6px rgba(0,0,0,.08), 0 30px 60px rgba(0,0,0,.12);
  --good: #168052;
  --graph-ink: 10, 10, 12;
  --grain-op: .035;
  color-scheme: light;
}

html[data-theme="dark"] {
  --canvas: #000000;
  --canvas-2: #060607;
  --surface: #101012;
  --surface-2: #19191c;
  --surface-3: #232327;
  --sep: rgba(255,255,255,.10);
  --sep-2: rgba(255,255,255,.06);
  --label: #ffffff;
  --label-2: rgba(235,235,245,.62);
  --label-3: rgba(235,235,245,.32);
  --accent: #fdfdfd;
  --accent-press: #d8d8da;
  --on-accent: #0a0a0c;
  --glass-border: rgba(255,255,255,.12);
  --glass-hi: rgba(255,255,255,.10);
  --shadow-1: 0 1px 2px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.5);
  --shadow-2: 0 2px 8px rgba(0,0,0,.6), 0 40px 80px rgba(0,0,0,.7);
  --good: #34d18a;
  --graph-ink: 235, 235, 245;
  --grain-op: .05;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* Hidden scrollbars, scrolling stays functional */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* overflow-x: clip keeps stray horizontal overflow contained without
   creating a scroll container, which would break position: sticky */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--label);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: background .5s var(--ease), color .5s var(--ease);
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 26px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: var(--on-accent);
  padding: 12px 18px;
  border-radius: var(--r-control);
}
.skip-link:focus { left: 18px; top: 18px; }

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand-blue-soft) 88%, var(--label));
  outline-offset: 4px;
  border-radius: 8px;
}

/* Same ambient canvas as the landing page */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--grain-op);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.4s var(--ease);
}
.hero-canvas.ready { opacity: 1; }

.hero-fade {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, transparent 40%, var(--canvas) 100%),
    linear-gradient(to bottom, transparent 60%, var(--canvas) 100%);
}

main,
section,
.footer {
  position: relative;
  z-index: 2;
}

/* ============================================================
   Header from Researchly landing
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: transform .5s var(--ease), background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s var(--ease);
}
.nav.scrolled {
  background: color-mix(in srgb, var(--canvas) 72%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--sep);
}
.nav.hide { transform: translateY(-100%); }

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.brand-home { flex: none; }
.brand-icon { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.brand-name {
  font-weight: 640;
  font-size: 17px;
  letter-spacing: 0;
  color: var(--label);
}
.brand-sub {
  font-size: 11px;
  color: var(--label-3);
  margin-top: 3px;
  letter-spacing: .02em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.home-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border-radius: var(--r-pill);
  color: var(--label-2);
  font-size: 13.5px;
  font-weight: 560;
  transition: color .25s, background .25s;
}
.home-link:hover,
.home-link.active {
  color: var(--label);
  background: var(--surface);
}

.theme-toggle,
.language-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  border: 1px solid var(--sep);
  background: var(--surface);
  color: var(--label);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .25s, border-color .25s, transform .35s var(--ease);
  position: relative;
}
.theme-toggle:hover,
.language-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--label-3);
}
.theme-toggle:active,
.language-toggle:active { transform: scale(.94); }
.theme-toggle svg {
  width: 18px;
  height: 18px;
  position: absolute;
  transition: opacity .35s var(--ease), transform .45s var(--ease);
}
.theme-toggle .i-sun { opacity: 0; transform: rotate(-90deg) scale(.4); }
.theme-toggle .i-moon { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="light"] .theme-toggle .i-sun { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="light"] .theme-toggle .i-moon { opacity: 0; transform: rotate(90deg) scale(.4); }

.language-menu {
  position: relative;
}
.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}
.language-toggle:disabled,
.language-menu.is-disabled .language-toggle {
  opacity: .44;
  cursor: default;
}
.language-toggle:disabled:hover,
.language-menu.is-disabled .language-toggle:hover {
  transform: none;
  border-color: var(--sep);
}
.language-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 120;
  width: min(260px, calc(100vw - 32px));
  max-height: min(460px, calc(100vh - 92px));
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--sep);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.language-menu.open .language-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--label-2);
  font: inherit;
  text-align: left;
  padding: 10px;
  cursor: pointer;
  transition: color .2s, background .2s;
}
.lang-option:hover,
.lang-option.active {
  color: var(--label);
  background: var(--surface-2);
}
.lang-option .flag {
  font-size: 18px;
  line-height: 1;
  width: 24px;
  text-align: center;
}
.lang-option .names {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
.lang-option .native {
  font-size: 14px;
  font-weight: 650;
}
.lang-option .english {
  font-size: 11.5px;
  color: var(--label-3);
  margin-top: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font: inherit;
  font-weight: 560;
  font-size: 15px;
  letter-spacing: 0;
  padding: 13px 24px;
  border-radius: var(--r-pill);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform .4s var(--ease), background .3s, border-color .3s, color .3s, box-shadow .3s;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-1);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.btn-ghost {
  background: transparent;
  color: var(--label);
  border-color: var(--sep);
}
.btn-ghost:hover {
  border-color: var(--label-3);
  transform: translateY(-2px);
}

/* ============================================================
   Text-first legal/support content
   ============================================================ */
.legal-page {
  min-height: 72svh;
  padding: clamp(132px, 18vh, 190px) 0 clamp(82px, 11vw, 140px);
}

.legal-head {
  max-width: 820px;
}

.page-title {
  font-size: 5.35rem;
  line-height: 1.01;
  letter-spacing: 0;
  font-weight: 680;
  margin: 0;
}
.page-title .soft {
  color: var(--label-2);
  font-weight: 600;
}

.subhead {
  font-size: 1.16rem;
  color: var(--label-2);
  max-width: 40em;
  margin: 24px 0 0;
  line-height: 1.62;
  font-weight: 400;
}

.legal-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 24px 0 0;
  color: var(--label-3);
  font-size: 13.5px;
}
.legal-meta span + span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 14px;
  border-radius: 50%;
  background: var(--label-3);
  vertical-align: middle;
}

.legal-body {
  max-width: 880px;
  margin-top: clamp(28px, 4vw, 44px);
}

/* Wide screens get a sticky "On this page" rail beside the text */
.legal-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
.legal-toc {
  display: none;
}
@media (min-width: 1100px) {
  .legal-cols {
    grid-template-columns: minmax(0, 1fr) 224px;
    gap: 64px;
  }
  .legal-toc {
    display: block;
    position: sticky;
    top: 112px;
    max-height: calc(100vh - 150px);
    overflow: auto;
    margin-top: clamp(28px, 4vw, 44px);
    overscroll-behavior: contain;
  }
}
.toc-label {
  margin: 0 0 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--label-3);
}
.legal-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--sep);
}
.legal-toc a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--label-3);
  font-size: 13px;
  line-height: 1.35;
  transition: color .25s, border-color .25s, transform .3s var(--ease);
}
.legal-toc a:hover {
  color: var(--label-2);
  transform: translateX(2px);
}
.legal-toc a.active {
  color: var(--label);
  border-left-color: var(--label);
}
.legal-toc a .n {
  display: inline-block;
  min-width: 20px;
  color: var(--label-3);
  font-variant-numeric: tabular-nums;
}

.legal-section {
  position: relative;
  padding: 0 0 44px;
  margin: 0 0 44px;
  border-bottom: 0;
  scroll-margin-top: 96px;
}
.legal-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--sep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .9s var(--ease-out);
}
.legal-section.in::after {
  transform: scaleX(1);
}
.legal-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}
.legal-section:last-child::after {
  display: none;
}

.legal-section h2,
.faq-group h2,
.support-contact h2 {
  transition: transform .42s var(--ease), color .32s;
  margin: 0 0 16px;
  color: var(--label);
  font-size: 1.95rem;
  line-height: 1.1;
  letter-spacing: 0;
  font-weight: 660;
}
@media (hover: hover) and (pointer: fine) {
  .legal-section:hover h2,
  .faq-group:hover h2 {
    transform: translateX(4px);
  }
}

.legal-section h3 {
  margin: 28px 0 8px;
  color: var(--label);
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: 0;
  font-weight: 640;
}

.legal-section p,
.legal-section li,
.faq-answer,
.support-contact p {
  color: var(--label-2);
}

.legal-section p,
.support-contact p {
  max-width: 68ch;
  margin: 0 0 16px;
  line-height: 1.72;
}

.legal-section ul {
  margin: 12px 0 20px;
  padding-left: 1.3rem;
}
.legal-section li {
  max-width: 66ch;
  margin: 10px 0;
  padding-left: 4px;
  line-height: 1.68;
}
.legal-section li::marker {
  color: var(--label-3);
}

/* Lead-in terms stay ink so lists scan at a glance */
.legal-section strong {
  color: var(--label);
  font-weight: 620;
}

/* Section numbers step back so titles read cleanly */
.legal-section h2 .sec-num,
.legal-section h3 .sec-num {
  color: var(--label-3);
  font-weight: 560;
  margin-right: .42em;
  font-variant-numeric: tabular-nums;
}

.legal-section a,
.faq-answer a,
.support-contact a:not(.btn) {
  color: var(--label);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brand-blue) 62%, transparent);
  text-underline-offset: 4px;
}
.legal-section a:hover,
.faq-answer a:hover,
.support-contact a:not(.btn):hover {
  text-decoration-color: currentColor;
}

.legal-note {
  max-width: 75ch;
  margin: 22px 0 0;
  padding: 0 0 0 18px;
  border-left: 2px solid var(--label);
  color: var(--label-2);
}
.legal-note strong {
  color: var(--label);
}

.support-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 900px;
  margin: 26px 0 clamp(40px, 6vw, 56px);
}
.support-index a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--sep);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--label-2);
  font-size: 13px;
  font-weight: 560;
  transition: color .25s, border-color .25s, transform .25s var(--ease), background .25s;
}
.support-index a:hover {
  color: var(--label);
  border-color: var(--label-3);
  transform: translateY(-1px);
}

.faq-group {
  max-width: 880px;
  margin: 0 0 clamp(48px, 7vw, 68px);
  scroll-margin-top: 96px;
}

.faq-group h2 {
  margin-bottom: 8px;
}

.faq-item {
  border-bottom: 1px solid var(--sep);
}
.faq-item:first-of-type {
  border-top: 1px solid var(--sep);
}

.faq-item summary {
  cursor: pointer;
  padding: 18px 0;
  color: var(--label);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  font-size: 1.02rem;
  font-weight: 560;
  line-height: 1.35;
  letter-spacing: 0;
  transition: color .25s;
}
.faq-item summary:hover::after {
  opacity: 1;
  transform: rotate(45deg) translateY(-1px);
}
.faq-item[open] summary:hover::after {
  transform: rotate(225deg) translateY(-3px);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
  opacity: .62;
  transition: transform .3s var(--ease), opacity .25s;
}
.faq-item[open] summary::after {
  transform: rotate(225deg) translateY(-3px);
  opacity: 1;
}

.faq-answer {
  max-width: 72ch;
  padding: 0 0 22px;
  font-size: .96rem;
  line-height: 1.62;
}
.faq-answer p {
  margin: 0;
}
.faq-answer p + p {
  margin-top: 10px;
}
.faq-answer code {
  font-family: var(--font-mono);
  font-size: .9em;
  color: var(--label);
}

/* FAQ open/close height is animated in legal.js; keep answers clip-safe */
.faq-answer {
  box-sizing: border-box;
}

/* Support tools: live FAQ filter + topic jump chips */
.support-tools {
  max-width: 560px;
  margin-top: 30px;
}
.support-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 17px;
  border: 1px solid var(--sep);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--label-3);
  cursor: text;
  transition: border-color .25s, background .25s;
}
.support-search:focus-within {
  border-color: var(--label-3);
  background: var(--surface);
}
.support-search svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.support-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--label);
  font: inherit;
  font-size: 16px; /* 16px minimum stops iOS Safari zooming the page on focus */
  outline: none;
}
.support-search input::placeholder {
  color: var(--label-3);
}
.support-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.support-empty {
  max-width: 68ch;
  margin: 6px 0 40px;
  color: var(--label-2);
}

.support-contact {
  max-width: 880px;
  padding-top: 10px;
}
.support-contact .btn {
  margin-top: 10px;
}

/* Reveal shared with the landing page */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .to-top {
    transition: none;
  }
}

/* ============================================================
   Footer - Caliq layout with Researchly colours
   ============================================================ */
.footer {
  border-top: 1px solid var(--sep);
  padding: 0;
  text-align: center;
  overflow: clip;
}
.footer-inner {
  padding-block: clamp(48px, 7vh, 68px) clamp(36px, 5vh, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.footer-squiggle {
  width: 36px;
  color: var(--label-2);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 34px;
}
.footer-nav a {
  padding: 2px;
  font-size: 14px;
  font-weight: 560;
  color: var(--label-2);
  transition: color .25s;
}
.footer-nav a:hover {
  color: var(--label);
}
.footer-copy {
  font-size: 12.5px;
  letter-spacing: .01em;
  color: var(--label-3);
}

@media (max-width: 780px) {
  .home-link {
    padding-inline: 12px;
  }
  .page-title {
    font-size: 4.35rem;
  }
  .subhead {
    font-size: 1.08rem;
  }
  .legal-section h2,
  .faq-group h2,
  .support-contact h2 {
    font-size: 1.7rem;
  }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .nav-inner { padding: 12px 20px; }
  .brand-sub { display: none; }
  .home-link {
    font-size: 13px;
    min-height: 36px;
    padding-inline: 11px;
  }
  .theme-toggle,
  .language-toggle {
    width: 36px;
    height: 36px;
  }
  .language-popover {
    right: 0;
  }
  .legal-page {
    padding-top: 118px;
  }
  .page-title {
    font-size: 3.6rem;
  }
  .subhead {
    font-size: 1.02rem;
  }
  .legal-section h2,
  .faq-group h2,
  .support-contact h2 {
    font-size: 1.5rem;
  }
  .legal-meta {
    display: block;
  }
  .legal-meta span {
    display: block;
  }
  .legal-meta span + span {
    margin-top: 5px;
  }
  .legal-meta span + span::before {
    display: none;
  }
  .support-index {
    gap: 7px;
  }
  .support-index a {
    font-size: 12.5px;
  }
  .footer-nav {
    gap: 8px 24px;
  }
}

/* ============================================================
   Finesse: reading progress, staggered title, back to top
   ============================================================ */

/* Title reveals word by word out of its own mask, like the landing hero */
.page-title .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: .18em;
  margin-bottom: -.18em;
}
.page-title .wi {
  display: inline-block;
  transform: translateY(112%);
  opacity: 0;
  filter: blur(6px);
  transition: transform .95s var(--ease-out), opacity .7s var(--ease-out), filter .85s var(--ease-out);
  transition-delay: var(--wd, 0ms);
  will-change: transform, filter;
}
.page-title.split-in .wi {
  transform: none;
  opacity: 1;
  filter: none;
}
@media (prefers-reduced-motion: reduce) {
  .page-title .wi {
    transform: none;
    opacity: 1;
    filter: none;
    transition: none;
  }
}

/* Glass back-to-top control for the long pages */
.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 30px);
  bottom: clamp(16px, 3vw, 30px);
  z-index: 90;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-border);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  color: var(--label);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px) scale(.9);
  pointer-events: none;
  transition: opacity .4s var(--ease), transform .5s var(--ease), border-color .25s, background .25s;
}
.to-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.to-top:hover {
  transform: translateY(-2px);
  border-color: var(--label-3);
}
.to-top:active { transform: scale(.94); }
.to-top svg { width: 18px; height: 18px; }
