/* QUIETPASS service site: design tokens, base styles and shared components.
   First-party only. The site CSP allows no inline style, no data: images and no web fonts. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Noto Sans CJK SC", "Source Han Sans SC", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Noto Sans CJK SC", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #060a12;
  --bg-2: #0a1120;
  --surface: #0e1628;
  --surface-2: #131d34;
  --surface-3: #1a2745;
  --glass: rgba(8, 13, 25, .68);
  --field: rgba(7, 12, 24, .72);
  --hover: rgba(150, 185, 255, .08);
  --line: rgba(150, 185, 255, .12);
  --line-2: rgba(150, 185, 255, .22);
  --ink: #eaf0ff;
  --ink-2: #aab7d6;
  --ink-3: #8696b9;
  --accent: #34dcb7;
  --accent-2: #3fb0ff;
  --accent-text: #5ff0cb;
  --on-accent: #03201a;
  --grad-accent: linear-gradient(135deg, #7bf7da 0%, #34dcb7 46%, #3fb0ff 100%);
  --grad-text: linear-gradient(100deg, #8ff9e0 0%, #43e0bd 38%, #4db6ff 100%);
  --accent-glow: rgba(52, 220, 183, .42);
  --one: #ffd58a;
  --one-2: #ff9f73;
  --one-glow: rgba(255, 190, 110, .5);
  --grad-one: linear-gradient(100deg, #ffe3a3 0%, #ffc070 50%, #ff9f73 100%);
  --ring: rgba(95, 240, 203, .38);
  --spot: rgba(95, 240, 203, .13);
  --ok: #45e6a2;
  --warn: #ffc35c;
  --danger: #ff8392;
  --info: #7cbcff;
  --orb-1: rgba(52, 220, 183, .17);
  --orb-2: rgba(63, 176, 255, .16);
  --orb-3: rgba(255, 195, 92, .07);
  --grid-line: rgba(150, 185, 255, .055);
  --shadow-soft: rgba(0, 0, 0, .42);
  --sh-1: 0 1px 2px rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 255, 255, .03) inset;
  --sh-2: 0 1px 1px rgba(0, 0, 0, .18), 0 4px 10px -2px rgba(0, 0, 0, .28), 0 18px 36px -12px rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 255, 255, .05) inset;
  --sh-3: 0 2px 2px rgba(0, 0, 0, .2), 0 10px 20px -4px rgba(0, 0, 0, .34), 0 34px 64px -18px rgba(0, 0, 0, .6), 0 1px 0 rgba(255, 255, 255, .07) inset;

  --r-sm: .6rem;
  --r-md: .95rem;
  --r-lg: 1.4rem;
  --r-xl: 1.9rem;
  --gut: clamp(1rem, 4vw, 2rem);
  --top-h: 4.25rem;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --fs-xs: .75rem;
  --fs-sm: .82rem;
  --fs-lg: 1rem;
  --fs-xl: clamp(1.05rem, .98rem + .3vw, 1.2rem);
  --fs-2xl: clamp(1.35rem, 1.1rem + 1vw, 1.7rem);
  --fs-hero: clamp(1.9rem, 1.2rem + 2.6vw, 2.7rem);
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, .009, .035 2.1%, .141, .281 6.7%, .723 12.9%, .938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, .991, .977 51%, .974 53.8%, .975 57.1%, .997 69.8%, 1.003 76.9%, 1);
  }
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f2f5fb;
    --bg-2: #e8eef8;
    --surface: #ffffff;
    --surface-2: #f6f8fd;
    --surface-3: #edf1fa;
    --glass: rgba(255, 255, 255, .72);
    --field: rgba(255, 255, 255, .9);
    --hover: rgba(18, 36, 80, .06);
    --line: rgba(18, 36, 80, .11);
    --line-2: rgba(18, 36, 80, .2);
    --ink: #0a1226;
    --ink-2: #434f6e;
    --ink-3: #596688;
    --accent-text: #0a7a67;
    --accent-glow: rgba(14, 160, 134, .32);
    --one: #d9822b;
    --one-2: #c5503a;
    --one-glow: rgba(217, 130, 43, .34);
    --grad-one: linear-gradient(100deg, #e0912e 0%, #d9722b 55%, #c5503a 100%);
    --ring: rgba(14, 160, 134, .3);
    --spot: rgba(14, 160, 134, .1);
    --ok: #08754c;
    --warn: #8f5400;
    --danger: #c52b44;
    --info: #1f6fc2;
    --orb-1: rgba(52, 220, 183, .22);
    --orb-2: rgba(63, 176, 255, .2);
    --orb-3: rgba(255, 195, 92, .14);
    --grid-line: rgba(18, 36, 80, .06);
    --shadow-soft: rgba(18, 36, 80, .14);
    --grad-text: linear-gradient(100deg, #0a9d82 0%, #0b8f9e 45%, #1c74d6 100%);
    --sh-1: 0 1px 2px rgba(18, 36, 80, .1), 0 1px 0 rgba(255, 255, 255, .9) inset;
    --sh-2: 0 1px 1px rgba(18, 36, 80, .06), 0 4px 10px -2px rgba(18, 36, 80, .1), 0 18px 36px -14px rgba(18, 36, 80, .2), 0 1px 0 rgba(255, 255, 255, .9) inset;
    --sh-3: 0 2px 2px rgba(18, 36, 80, .08), 0 10px 20px -4px rgba(18, 36, 80, .14), 0 34px 64px -20px rgba(18, 36, 80, .3), 0 1px 0 rgba(255, 255, 255, .9) inset;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f5fb;
  --bg-2: #e8eef8;
  --surface: #ffffff;
  --surface-2: #f6f8fd;
  --surface-3: #edf1fa;
  --glass: rgba(255, 255, 255, .72);
  --field: rgba(255, 255, 255, .9);
  --hover: rgba(18, 36, 80, .06);
  --line: rgba(18, 36, 80, .11);
  --line-2: rgba(18, 36, 80, .2);
  --ink: #0a1226;
  --ink-2: #434f6e;
  --ink-3: #596688;
  --accent-text: #0a7a67;
  --accent-glow: rgba(14, 160, 134, .32);
  --one: #d9822b;
  --one-2: #c5503a;
  --one-glow: rgba(217, 130, 43, .34);
  --grad-one: linear-gradient(100deg, #e0912e 0%, #d9722b 55%, #c5503a 100%);
  --ring: rgba(14, 160, 134, .3);
  --spot: rgba(14, 160, 134, .1);
  --ok: #08754c;
  --warn: #8f5400;
  --danger: #c52b44;
  --info: #1f6fc2;
  --orb-1: rgba(52, 220, 183, .22);
  --orb-2: rgba(63, 176, 255, .2);
  --orb-3: rgba(255, 195, 92, .14);
  --grid-line: rgba(18, 36, 80, .06);
  --shadow-soft: rgba(18, 36, 80, .14);
  --grad-text: linear-gradient(100deg, #0a9d82 0%, #0b8f9e 45%, #1c74d6 100%);
  --sh-1: 0 1px 2px rgba(18, 36, 80, .1), 0 1px 0 rgba(255, 255, 255, .9) inset;
  --sh-2: 0 1px 1px rgba(18, 36, 80, .06), 0 4px 10px -2px rgba(18, 36, 80, .1), 0 18px 36px -14px rgba(18, 36, 80, .2), 0 1px 0 rgba(255, 255, 255, .9) inset;
  --sh-3: 0 2px 2px rgba(18, 36, 80, .08), 0 10px 20px -4px rgba(18, 36, 80, .14), 0 34px 64px -20px rgba(18, 36, 80, .3), 0 1px 0 rgba(255, 255, 255, .9) inset;
}

/* The operator console uses a warm accent so it is never mistaken for the customer site. */
:root[data-surface="operator"] {
  --accent: #ffb84d;
  --accent-2: #ff8f5a;
  --accent-text: #ffcd6b;
  --on-accent: #2a1600;
  --grad-accent: linear-gradient(135deg, #ffe08a 0%, #ffb84d 48%, #ff8f5a 100%);
  --grad-text: linear-gradient(100deg, #ffe08a 0%, #ffb84d 45%, #ff9a6a 100%);
  --accent-glow: rgba(255, 184, 77, .4);
  --ring: rgba(255, 184, 77, .4);
  --spot: rgba(255, 184, 77, .12);
  --orb-1: rgba(255, 184, 77, .15);
  --orb-2: rgba(255, 143, 90, .12);
  --orb-3: rgba(63, 176, 255, .08);
}

@media (prefers-color-scheme: light) {
  :root[data-surface="operator"]:not([data-theme="dark"]) {
    --accent-text: #8f4f00;
    --accent-glow: rgba(214, 140, 20, .3);
    --ring: rgba(214, 140, 20, .32);
    --spot: rgba(214, 140, 20, .1);
    --grad-text: linear-gradient(100deg, #c27400 0%, #d4620a 50%, #c2410c 100%);
  }
}

:root[data-surface="operator"][data-theme="light"] {
  --accent-text: #8f4f00;
  --accent-glow: rgba(214, 140, 20, .3);
  --ring: rgba(214, 140, 20, .32);
  --spot: rgba(214, 140, 20, .1);
  --grad-text: linear-gradient(100deg, #c27400 0%, #d4620a 50%, #c2410c 100%);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
@media (min-width: 80rem) {
  html { font-size: clamp(1rem, calc(.86rem + .2vw), 1.125rem); }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: .938rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}
main { flex: 1 0 auto; display: block; outline: 0; }
h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--accent-text); text-decoration: none; text-underline-offset: .2em; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, kbd { font-family: var(--font-mono); }
b, strong { font-weight: 650; }
::selection { background: var(--ring); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: .4rem; }
[hidden] { display: none !important; }

/* The fixed backdrop: drifting colour orbs under a faint grid. */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38% 38% at 18% 18%, var(--orb-1), transparent 70%),
    radial-gradient(34% 34% at 82% 26%, var(--orb-2), transparent 70%),
    radial-gradient(40% 40% at 58% 88%, var(--orb-3), transparent 72%);
  animation: drift 46s ease-in-out infinite alternate;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 3.5rem 3.5rem;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 10%, transparent 72%);
}
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) rotate(0deg) scale(1); }
  to { transform: translate3d(3%, 2%, 0) rotate(6deg) scale(1.08); }
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 100; padding: .7rem 1.1rem;
  background: var(--accent); color: var(--on-accent); border-radius: 999px; font-weight: 650; text-decoration: none;
  transition: top .25s var(--ease);
}
.skip:focus { top: 1rem; text-decoration: none; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-2); }
.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: 100%; max-width: clamp(74rem, 70vw, 120rem); margin-inline: auto; padding-inline: max(var(--gut), env(safe-area-inset-left)) max(var(--gut), env(safe-area-inset-right)); }
.wrap-narrow { max-width: 50rem; }
.wrap-reading { max-width: 46rem; }

/* Reading progress bar, driven by script. */
.scrollbar { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 70; pointer-events: none; }
.scrollbar i { display: block; height: 100%; background: var(--grad-accent); transform-origin: 0 50%; transform: scaleX(var(--sp, 0)); box-shadow: 0 0 12px var(--accent-glow); }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color .35s, border-color .35s, box-shadow .35s;
  view-transition-name: site-top;
}
.top.is-stuck {
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 30px -22px rgba(0, 0, 0, .7);
}
.top-in { display: flex; align-items: center; gap: .25rem 1rem; min-height: var(--top-h); }
.brand { display: inline-flex; align-items: center; gap: .65rem; min-height: 2.75rem; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: .03em; flex: 0 1 auto; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 2.1rem; height: 2.1rem; filter: drop-shadow(0 4px 14px var(--accent-glow)); transition: transform .5s var(--spring); }
.brand:hover .brand-mark { transform: translateY(-2px) scale(1.06); }
.brand-name { display: grid; line-height: 1.08; font-size: .952rem; }
.brand-name small { font-size: .595rem; font-weight: 500; letter-spacing: .42em; color: var(--ink-3); }
.badge { display: inline-flex; align-items: center; padding: .15rem .55rem; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; border: 1px solid var(--line-2); color: var(--accent-text); background: var(--hover); }
.nav { display: flex; align-items: center; gap: .15rem; margin-inline: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .35rem .9rem; border-radius: 999px; color: var(--ink-2); font-size: .895rem; transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--ink); background: var(--hover); text-decoration: none; }
.nav .nav-extra, .nav .nav-theme { display: none; }
.nav .nav-theme { align-items: center; min-height: 2.75rem; padding: .35rem .9rem; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: .895rem; text-align: left; }
.nav .nav-theme:hover { color: var(--ink); background: var(--hover); }
.top-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; min-width: 0; margin-left: auto; }
.nav + .top-actions { margin-left: 0; }
.top-actions form { margin: 0; display: contents; }

.icon-btn {
  width: 2.75rem; height: 2.75rem; display: inline-grid; place-items: center; padding: 0; border-radius: 50%;
  background: transparent; border: 1px solid var(--line); color: var(--ink-2); position: relative;
  transition: color .2s, background-color .2s, border-color .2s, transform .35s var(--spring);
}
.icon-btn:hover { color: var(--ink); background: var(--hover); border-color: var(--line-2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn .i { grid-area: 1 / 1; transition: transform .5s var(--spring), opacity .3s; }
[data-theme-toggle] .i-moon { opacity: 0; transform: rotate(-90deg) scale(.5); }
:root[data-theme="light"] [data-theme-toggle] .i-sun { opacity: 0; transform: rotate(90deg) scale(.5); }
:root[data-theme="light"] [data-theme-toggle] .i-moon { opacity: 1; transform: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) [data-theme-toggle] .i-sun { opacity: 0; transform: rotate(90deg) scale(.5); }
  :root:not([data-theme]) [data-theme-toggle] .i-moon { opacity: 1; transform: none; }
}
.nav-toggle .i-shut { opacity: 0; transform: rotate(-90deg) scale(.5); }
.nav-toggle[aria-expanded="true"] .i-shut { opacity: 1; transform: none; }
.nav-toggle[aria-expanded="true"] .i-open { opacity: 0; transform: rotate(90deg) scale(.5); }

@media (max-width: 56rem) {
  .top-in { flex-wrap: wrap; row-gap: 0; }
  .nav { order: 4; width: 100%; margin: 0; padding-bottom: .5rem; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav .nav-extra { display: inline-flex; }
  .js .nav { display: none; }
  .js .nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: .15rem; padding: .5rem 0 1rem; animation: sheet-in .35s var(--ease); }
  .js .nav a { padding: .8rem 1rem; font-size: .952rem; border-radius: var(--r-sm); }
  .top-actions { margin-left: auto; }
  .nav + .top-actions { margin-left: auto; }
  .top:has(.nav.is-open) { background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom-color: var(--line); }
}
@media (min-width: 56.01rem) {
  .nav-toggle { display: none !important; }
  [data-surface="operator"] .top-in:has(.nav a:nth-child(2)) { flex-wrap: wrap; row-gap: 0; }
  [data-surface="operator"] .nav:has(a:nth-child(2)) { order: 4; width: 100%; display: flex; flex-wrap: wrap; padding-bottom: .5rem; }
  [data-surface="operator"] .nav a { padding-inline: .7rem; }
  [data-surface="operator"] .top-actions { margin-inline-start: auto; }
}
@media (max-width: 34rem) {
  .top-actions .btn-ghost { display: none; }
}
@media (max-width: 30rem) {
  .top-actions [data-theme-toggle] { display: none; }
  .nav .nav-theme { display: inline-flex; }
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(-.5rem); } to { opacity: 1; transform: none; } }

/* ---------- Application shell: customer centre and operator console ---------- */
:root { --side-w: 15.75rem; --side-rail: 4.75rem; }
.top-shell .top-in { display: flex; flex-wrap: nowrap; align-items: center; gap: .6rem 1rem; padding-inline: max(var(--gut), env(safe-area-inset-left)) max(var(--gut), env(safe-area-inset-right)); }
.top-shell .top-actions { flex-wrap: nowrap; margin-left: auto; }
.who { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.25rem; padding: .25rem .85rem .25rem .7rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--hover); color: var(--accent-text); font-size: var(--fs-xs); font-weight: 650; white-space: nowrap; }
.who .i { width: 1.05rem; height: 1.05rem; }
.nav-badge { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; margin-left: .35rem; padding: 0 .4rem; border-radius: 999px; color: var(--on-accent); background: var(--grad-accent); font-size: .691rem; font-weight: 760; font-style: normal; line-height: 1; }
.shell { flex: 1 0 auto; display: block; min-width: 0; }
.shell-col { display: flex; flex-direction: column; min-width: 0; min-height: calc(100dvh - var(--top-h)); }
.shell-col > main { flex: 1 0 auto; }
.side { display: flex; flex-direction: column; gap: .8rem; padding: .9rem 1rem 1rem; border-bottom: 1px solid var(--line); }
.side-nav { display: grid; gap: .12rem; align-content: start; }
.side-group { margin: 1.1rem .75rem .35rem; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 650; letter-spacing: .14em; }
.side-group:first-child { margin-top: .15rem; }
.sb-link {
  position: relative; display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 2.75rem; padding: .5rem .8rem;
  border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink-2); font-size: .895rem; font-weight: 560; text-align: left; text-decoration: none;
  transition: color .2s, background-color .25s, box-shadow .25s;
}
.sb-link:hover { color: var(--ink); background: var(--hover); text-decoration: none; }
.sb-link .i { width: 1.25rem; height: 1.25rem; transition: color .2s, transform .4s var(--spring); }
.sb-link:hover .i { transform: scale(1.12); }
.sb-link.is-here { color: var(--ink); background: linear-gradient(90deg, var(--hover), transparent 92%); box-shadow: inset 0 0 0 1px var(--line); }
.sb-link.is-here .i { color: var(--accent-text); }
.sb-link.is-here::before { content: ""; position: absolute; left: -1rem; top: .6rem; bottom: .6rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad-accent); box-shadow: 0 0 14px var(--accent-glow); }
.sb-link .nav-badge { margin-left: auto; }
.side-foot { margin-top: auto; display: grid; gap: .12rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.side-theme { display: none; }
.side { view-transition-name: site-side; }
.scrim { display: none; }
.foot-shell { margin-top: 2rem; }
.foot-shell .foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1.5rem; padding: 1rem var(--gut); }
.foot-note { color: var(--ink-3); font-size: var(--fs-xs); letter-spacing: .12em; }
@media (min-width: 62rem) {
  .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); align-items: start; transition: grid-template-columns .45s var(--ease); }
  html[data-side="rail"] .shell { grid-template-columns: var(--side-rail) minmax(0, 1fr); }
  .side-toggle { display: none !important; }
  .side { position: sticky; top: var(--top-h); height: calc(100dvh - var(--top-h)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border-bottom: 0; border-right: 1px solid var(--line); }
  html[data-side="rail"] .side { padding-inline: .8rem; }
  html[data-side="rail"] .sb-link { justify-content: center; padding-inline: 0; }
  html[data-side="rail"] .sb-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html[data-side="rail"] .sb-link.is-here::before { left: -.8rem; }
  html[data-side="rail"] .side-group { height: 1px; margin: .8rem .6rem; padding: 0; overflow: hidden; color: transparent; background: var(--line); }
  html[data-side="rail"] .sb-link .nav-badge { position: absolute; top: .3rem; right: .55rem; min-width: .6rem; height: .6rem; padding: 0; font-size: 0; margin: 0; }
  .side-collapse .i { transition: transform .45s var(--spring); }
  html[data-side="rail"] .side-collapse .i { transform: scaleX(-1); }
}
@media (max-width: 61.99rem) {
  .js .side {
    position: fixed; z-index: 49; inset: var(--top-h) auto 0 0; width: min(19rem, 88vw); padding-bottom: max(1rem, env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain;
    border: 0; border-right: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--sh-3);
    transform: translateX(-104%); visibility: hidden; transition: transform .45s var(--ease), visibility 0s .45s;
  }
  .js .side.is-open { transform: none; visibility: visible; transition: transform .45s var(--ease); }
  .js .side.is-open + .scrim { display: block; position: fixed; z-index: 48; inset: 0; background: rgba(3, 6, 12, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade-in .3s ease-out; }
  body:has(.side.is-open) { overflow: hidden; }
  .top-shell:has(~ .shell .side.is-open) { background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom-color: var(--line); }
  .side-collapse { display: none; }
}
.top-shell .brand { flex: 0 1 auto; min-width: 2.75rem; justify-content: center; }
.top-shell .brand-name { white-space: nowrap; }
.top-shell .icon-btn, .top-shell .btn { flex: none; }
.top-shell .top-in { container-type: inline-size; }
/* Container units follow the root font size, so this also holds when the reader enlarges the text. */
@container (max-width: 21rem) { .brand-name, .badge-op, .who { display: none; } }
@media (max-width: 40rem) {
  .top-shell .who, .top-shell .btn-text { display: none; }
  .top-shell .top-actions .btn-sm { padding-inline: .8rem; }
}
@media (max-width: 30rem) {
  .top-shell .brand-name small, .top-shell .badge-op { display: none; }
  .side-theme { display: flex; }
}

/* ---------- Buttons ---------- */
.btn {
  --press: 1;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3rem .55rem;
  min-height: 2.9rem; padding: .7rem min(1.4rem, 5vw); border-radius: 999px;
  font-size: .91rem; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none; letter-spacing: .01em;
  border: 1px solid transparent; background: transparent; color: var(--ink);
  transition: transform .3s var(--spring), translate .4s var(--spring), box-shadow .3s var(--ease), background-color .25s, color .25s, border-color .25s, opacity .25s;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: .1s; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn .i { transition: transform .35s var(--spring); }
.btn:hover .i-arrow, .btn:hover .i:last-child { transform: translateX(3px); }
.btn-primary {
  color: var(--on-accent); background: var(--grad-accent); background-size: 140% 140%; background-position: 0% 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .22) inset, 0 1px 0 rgba(255, 255, 255, .5) inset, 0 10px 28px -8px var(--accent-glow), 0 2px 6px rgba(0, 0, 0, .22);
}
.btn-primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, .6) 50%, transparent 68%);
  transform: translateX(-130%); transition: transform .85s var(--ease);
}
.btn-primary:hover { background-position: 100% 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .3) inset, 0 1px 0 rgba(255, 255, 255, .55) inset, 0 16px 36px -8px var(--accent-glow), 0 3px 8px rgba(0, 0, 0, .25); }
.btn-primary:hover::before { transform: translateX(130%); }
.btn-ghost { background: var(--hover); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--ring); }
.btn-quiet { color: var(--ink-2); }
.btn-quiet:hover { color: var(--ink); background: var(--hover); }
.btn-sm { min-height: 2.75rem; padding: .45rem min(1rem, 3.5vw); font-size: .852rem; }
.btn-lg { min-height: 3.4rem; padding: .85rem min(1.9rem, 6vw); font-size: .965rem; }
.btn-block { width: 100%; }
.btn .rip { position: absolute; z-index: -1; border-radius: 50%; background: rgba(255, 255, 255, .45); transform: scale(0); animation: rip .7s var(--ease) forwards; pointer-events: none; }
.btn-ghost .rip, .btn-quiet .rip { background: var(--ring); }
@keyframes rip { to { transform: scale(1); opacity: 0; } }
.btn.is-loading { pointer-events: none; }
.btn .spinner { display: none; width: 1.15em; height: 1.15em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn-label { opacity: .75; }
.btn.is-loading:not(:has(.spinner))::after { content: ""; width: 1.05em; height: 1.05em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Cards and depth ---------- */
.card {
  position: relative;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--surface-2) 0%, var(--surface) 62%);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
  transition: box-shadow .4s var(--ease), border-color .4s;
}
.card:hover { box-shadow: var(--sh-3); }
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, 0%), var(--spot), transparent 62%);
}
.card:hover::after { opacity: 1; }
@supports ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  .card::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
    background: linear-gradient(145deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0) 65%, var(--ring));
    opacity: .55; transition: opacity .4s;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    mask-composite: exclude;
  }
  .card:hover::before { opacity: 1; }
}
:root[data-theme="light"] .card::before { background: linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0) 60%, var(--ring)); }
.tilt { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; will-change: transform; }
.tilt.is-tilting { transition-duration: .08s; }

/* ---------- Reveal and motion ---------- */
.js .rv { opacity: 0; translate: 0 1.6rem; transition: opacity .9s var(--ease) var(--rd, 0s), translate 1s var(--ease) var(--rd, 0s); animation: rv-safe .01s 3s forwards; }
.js .rv.tilt { transition: opacity .9s var(--ease) var(--rd, 0s), translate 1s var(--ease) var(--rd, 0s), transform .35s var(--ease), box-shadow .4s var(--ease); }
.js .rv.in { opacity: 1; translate: none; animation: none; }
@keyframes rv-safe { to { opacity: 1; translate: none; } }
.stagger > .rv:nth-child(1) { --rd: .02s; }
.stagger > .rv:nth-child(2) { --rd: .1s; }
.stagger > .rv:nth-child(3) { --rd: .18s; }
.stagger > .rv:nth-child(4) { --rd: .26s; }
.stagger > .rv:nth-child(5) { --rd: .34s; }
.stagger > .rv:nth-child(6) { --rd: .42s; }
.stagger > .rv:nth-child(7) { --rd: .5s; }
.stagger > .rv:nth-child(n+8) { --rd: .56s; }
.auth-side > .rv:nth-child(1) { --rd: .05s; }
.auth-side > .rv:nth-child(2) { --rd: .15s; }
.auth-side > .rv:nth-child(3) { --rd: .27s; }
.auth-side > .rv:nth-child(4) { --rd: .38s; }

.pulse-dot { position: relative; width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 10px var(--accent-glow); }
.pulse-dot::after { content: ""; position: absolute; inset: -.3rem; border-radius: 50%; border: 1px solid var(--accent); animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
.grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; background-size: 160% 100%; animation: sheen 8s ease-in-out infinite alternate; }
@keyframes sheen { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.eyebrow { display: inline-flex; align-items: center; gap: .6rem; padding: .35rem .9rem .35rem .75rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--hover); color: var(--accent-text); font-size: var(--fs-sm); font-weight: 600; letter-spacing: .04em; }
.eyebrow .i { width: 1.1em; height: 1.1em; }

/* ---------- Forms ---------- */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 1.4rem; }
.field { position: relative; min-width: 0; }
.field input {
  width: 100%; min-width: 0; min-height: 3.6rem; padding: 1.5rem 3rem .5rem 3rem; border-radius: var(--r-md);
  background: var(--field); border: 1px solid var(--line-2); color: var(--ink); font-size: .938rem; line-height: 1.3;
  transition: border-color .2s, box-shadow .25s var(--ease), background-color .2s;
  appearance: none; -webkit-appearance: none;
}
.field input:hover { border-color: var(--ring); }
.field input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.field .lbl { position: absolute; left: 3rem; top: 1.15rem; color: var(--ink-3); font-size: .938rem; line-height: 1.3; pointer-events: none; transform-origin: 0 0; transition: transform .25s var(--ease), color .2s; }
.field input:focus + .lbl, .field input:not(:placeholder-shown) + .lbl { transform: translateY(-.62rem) scale(.76); color: var(--accent-text); }
.field .ico { position: absolute; left: 1.05rem; top: 1.2rem; width: 1.3rem; height: 1.3rem; color: var(--ink-3); transition: color .2s; pointer-events: none; }
.field input:focus ~ .ico, .field:focus-within .ico { color: var(--accent-text); }
.field input:not(:placeholder-shown):not(:focus):invalid { border-color: var(--danger); }
.field input:not(:placeholder-shown):not(:focus):invalid + .lbl { color: var(--danger); }
.field.is-bad input { border-color: var(--danger); animation: shake .45s var(--ease); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.reveal { position: absolute; right: .5rem; top: .4rem; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; padding: 0; background: transparent; border: 0; border-radius: 50%; color: var(--ink-3); transition: color .2s, background-color .2s; }
.reveal:hover { color: var(--ink); background: var(--hover); }
.reveal .i { grid-area: 1 / 1; transition: transform .4s var(--spring), opacity .25s; }
.reveal .i-hide { opacity: 0; transform: scale(.4); }
.reveal[aria-pressed="true"] .i-hide { opacity: 1; transform: none; }
.reveal[aria-pressed="true"] .i-show { opacity: 0; transform: scale(.4); }
.help { margin-top: -.35rem; padding-inline: .25rem; color: var(--ink-3); font-size: var(--fs-xs); line-height: 1.5; }
.caps-hint { display: flex; align-items: center; gap: .45rem; margin-top: -.4rem; color: var(--warn); font-size: var(--fs-xs); }
.caps-hint .i { width: 1.05em; height: 1.05em; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; margin-top: -.4rem; }
.meter i { height: .3rem; border-radius: 99px; background: var(--line-2); transition: background-color .3s, transform .4s var(--spring); transform-origin: 0 50%; }
.meter[data-level="1"] i:nth-child(-n+1) { background: var(--danger); }
.meter[data-level="2"] i:nth-child(-n+2) { background: var(--warn); }
.meter[data-level="3"] i:nth-child(-n+3) { background: var(--accent); }
.meter[data-level="4"] i { background: var(--ok); }
.alert { display: flex; gap: .7rem; align-items: flex-start; margin-top: 1.1rem; padding: .85rem 1rem; border-radius: var(--r-md); border: 1px solid var(--line-2); font-size: var(--fs-sm); line-height: 1.55; animation: alert-in .5s var(--spring); }
.alert .i { margin-top: .12em; }
.alert-danger { color: var(--danger); background: rgba(255, 131, 146, .09); border-color: rgba(255, 131, 146, .38); }
@keyframes alert-in { from { opacity: 0; transform: translateY(-.5rem) scale(.98); } to { opacity: 1; transform: none; } }

/* Touch browsers zoom the page when a field is smaller than 16px. */
@media (pointer: coarse) { .field input, .fld input, .search input { font-size: 1rem; } }

/* ---------- Dialog and toast ---------- */
.modal { width: min(30rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible; }
.modal::backdrop { background: rgba(3, 6, 12, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal[open] { animation: modal-in .45s var(--spring); }
.modal[open]::backdrop { animation: fade-in .3s ease-out; }
.modal-card { padding: 1.6rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; max-height: calc(100dvh - 2rem); overflow: auto; }
.modal-card::before, .modal-card::after { inset: 0; }
.modal-card h3 { font-size: var(--fs-xl); }
.modal-list { display: grid; gap: .1rem; }
.modal-list div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.modal-list dt { color: var(--ink-2); font-size: var(--fs-sm); }
.modal-list dd { font-weight: 600; text-align: right; }
.modal-total { border-bottom: 0 !important; padding-top: .9rem !important; }
.modal-total dd { font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.modal-note { color: var(--ink-2); font-size: var(--fs-sm); }
.modal-actions { display: flex; gap: .7rem; justify-content: flex-end; flex-wrap: wrap; }
@keyframes modal-in { from { opacity: 0; transform: translateY(1.2rem) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.toasts { position: fixed; inset: auto 0 max(1.2rem, env(safe-area-inset-bottom)) 0; display: grid; justify-items: center; gap: .55rem; padding-inline: 1rem; z-index: 90; pointer-events: none; }
.toast {
  display: inline-flex; align-items: center; gap: .6rem; max-width: min(26rem, 100%); padding: .75rem 1.1rem; border-radius: 999px;
  background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--line-2); box-shadow: var(--sh-3); color: var(--ink); font-size: var(--fs-sm);
  animation: toast-in .5s var(--spring), toast-out .35s ease-in 2.6s forwards;
}
.toast .i { color: var(--ok); }
@keyframes toast-in { from { opacity: 0; transform: translateY(1rem) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(.6rem) scale(.96); } }

/* ---------- Footer ---------- */
.foot { margin-top: 4rem; border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, var(--hover)); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-block: 2.6rem 3rem; }
.foot-brand { max-width: 26rem; display: grid; gap: .9rem; }
.foot-brand p { color: var(--ink-2); font-size: var(--fs-sm); }
.foot-links { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-content: start; }
.foot-links a { display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; justify-content: center; color: var(--ink-2); font-size: var(--fs-sm); }
.foot-links a:hover { color: var(--ink); }

/* ---------- Page transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: .22s ease-in both vt-out; }
::view-transition-new(root) { animation: .38s var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-.4rem); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(.6rem); } }
.vt-theme::view-transition-old(root), .vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Accessibility modes ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js .rv { opacity: 1; translate: none; }
  .tilt { transform: none !important; }
}
@media (forced-colors: active) {
  .btn-primary, .btn-ghost { border-color: ButtonText; }
  .card { border-color: CanvasText; }
}
@media print {
  body::before, body::after, .top, .scrollbar, .foot, .toasts, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #999; background: #fff; }
}
