/* QuantumEdge Capital — member & admin app design system ("QE OS")
   Shares tokens, type and motion with the public site (assets/css/qe-studio.css). */

@view-transition { navigation: auto; }

/* ───────────────────────── Tokens ───────────────────────── */
:root {
  --ink-0: #050608;
  --ink-1: #0a0c10;
  --ink-2: #11141a;
  --ink-3: #191d25;
  --bone: #edeae2;
  --signal: #8fe3ff;
  --signal-2: #3fb6e6;
  --ember: #ffb36b;
  --rose: #ff8a8a;
  --mint: #7ee2b0;

  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-ui: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --top-h: 64px;
  --dock-h: 72px;
  --rail-w: 264px;
  --gut: clamp(16px, 4vw, 40px);

  /* light ("paper") */
  --bg: #f1eee7;
  --bg-2: #e9e5dc;
  --surface: #fbfaf6;
  --surface-2: #f4f1ea;
  --surface-3: #ebe7de;
  --text: #0b0d11;
  --text-2: rgba(11, 13, 17, 0.66);
  --text-3: rgba(11, 13, 17, 0.44);
  --line: rgba(11, 13, 17, 0.09);
  --line-2: rgba(11, 13, 17, 0.16);
  --accent: #1f8fbd;
  --accent-ink: #fbfaf6;
  --accent-soft: rgba(31, 143, 189, 0.1);
  --pos: #178a5a;
  --neg: #c2413f;
  --warn: #b86b12;
  --info: #1f8fbd;
  --btn-bg: #0b0d11;
  --btn-fg: #f4f1ea;
  --btn-fill: #1f8fbd;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 18px 40px -24px rgba(11, 13, 17, 0.28);
  --shadow-lg: 0 40px 90px -40px rgba(11, 13, 17, 0.45);
  --glass: rgba(251, 250, 246, 0.72);
  --grain-o: 0.035;
  --field-canvas: 0.55;
  color-scheme: light;
}

html.os-dark {
  --bg: var(--ink-0);
  --bg-2: var(--ink-1);
  --surface: #0b0d12;
  --surface-2: #11141a;
  --surface-3: #181c24;
  --text: var(--bone);
  --text-2: rgba(237, 234, 226, 0.66);
  --text-3: rgba(237, 234, 226, 0.42);
  --line: rgba(237, 234, 226, 0.09);
  --line-2: rgba(237, 234, 226, 0.17);
  --accent: var(--signal);
  --accent-ink: var(--ink-0);
  --accent-soft: rgba(143, 227, 255, 0.1);
  --pos: var(--mint);
  --neg: var(--rose);
  --warn: var(--ember);
  --info: var(--signal);
  --btn-bg: var(--bone);
  --btn-fg: var(--ink-0);
  --btn-fill: var(--signal);
  --shadow: 0 1px 0 rgba(237, 234, 226, 0.05) inset, 0 24px 60px -30px rgba(0, 0, 0, 0.9);
  --shadow-lg: 0 50px 120px -40px rgba(0, 0, 0, 0.95);
  --glass: rgba(8, 10, 13, 0.72);
  --grain-o: 0.06;
  --field-canvas: 1;
  color-scheme: dark;
}

/* ───────────────────────── Base ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body.os {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: background-color 0.5s ease, color 0.5s ease;
}
:where(body.os) img { max-width: 100%; }
:where(body.os) a { color: inherit; text-decoration: none; }
body.os ::selection { background: var(--accent); color: var(--accent-ink); }
body.os :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
:where(body.os) :is(h1, h2, h3, h4, h5, h6) {
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}
:where(body.os) p { margin: 0; }
:where(body.os) :is(strong, b) { font-weight: 600; }
.os-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.os-mono { font-family: var(--font-mono); }
.os-serif { font-family: var(--font-display); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
em.os-em, .os-title em { font-family: var(--font-display); font-style: italic; font-weight: 400; letter-spacing: -0.015em; color: var(--accent); }

/* ambient light, hairline grid, grain */
.os-ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.os-ambient::before {
  content: "";
  position: absolute;
  width: 90vmax; height: 90vmax;
  right: -38vmax; top: -48vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  opacity: 0.7;
  animation: os-drift 26s var(--ease-io) infinite alternate;
}
.os-ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 70% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse 80% 60% at 70% 0%, #000 0%, transparent 70%);
  opacity: 0.55;
}
.os-ambient i {
  position: absolute;
  width: 60vmax; height: 60vmax;
  left: -30vmax; bottom: -40vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--ember) 12%, transparent), transparent 70%);
  animation: os-drift 32s var(--ease-io) infinite alternate-reverse;
}
@keyframes os-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-6vmax, 5vmax, 0) scale(1.12); }
}
.os-grain {
  pointer-events: none;
  position: fixed;
  inset: -50%;
  z-index: 200;
  opacity: var(--grain-o);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: os-grain 1.2s steps(6) infinite;
}
html:not(.os-dark) .os-grain { filter: invert(1); }
@keyframes os-grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ───────────────────────── Loader (#loader, hidden by base.js) ───────────────────────── */
#loader.os-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.35s ease;
}
.os-loader__core { display: grid; justify-items: center; gap: 18px; }
.os-loader__mark {
  width: 54px; height: 54px;
  animation: os-spin 2.4s linear infinite;
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--accent) 45%, transparent));
}
.os-loader__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
}
.os-loader__bar { width: 120px; height: 1px; background: var(--line-2); overflow: hidden; position: relative; }
.os-loader__bar::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--accent);
  transform-origin: left;
  animation: os-load 0.9s var(--ease-io) infinite;
}
@keyframes os-load { 0% { transform: scaleX(0); } 60% { transform: scaleX(1); transform-origin: left; } 61% { transform-origin: right; } 100% { transform: scaleX(0); transform-origin: right; } }
@keyframes os-spin { to { transform: rotate(360deg); } }
html.os-warm #loader.os-loader { background: transparent; pointer-events: none; place-items: start stretch; }
html.os-warm .os-loader__core { display: none; }
html.os-warm #loader.os-loader::before {
  content: "";
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: os-sweep 0.8s var(--ease-io) infinite;
}
@keyframes os-sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ───────────────────────── Buttons ───────────────────────── */
.os-btn {
  --b-bg: var(--btn-bg);
  --b-fg: var(--btn-fg);
  --b-fill: var(--btn-fill);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--b-bg);
  color: var(--b-fg);
  font: 600 14.5px/1 var(--font-ui);
  letter-spacing: -0.01em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.5s var(--ease-out), box-shadow 0.4s ease, opacity 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.os-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--b-fill);
  border-radius: inherit;
  clip-path: circle(0% at var(--bx, 50%) var(--by, 110%));
  transition: clip-path 0.6s var(--ease-out);
}
@media (hover: hover) { .os-btn:hover::before { clip-path: circle(150% at var(--bx, 50%) var(--by, 110%)); } .os-btn:hover { color: var(--accent-ink); } }
.is-mag { transition-property: box-shadow, opacity, color, background-color; }
.os-btn:active { transform: scale(0.97); }
.os-btn--icon { padding: 0 7px 0 22px; }
.os-btn__icon {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--b-fg);
  color: var(--b-bg);
  transition: transform 0.6s var(--ease-out), background 0.3s ease;
}
.os-btn__icon svg { width: 14px; height: 14px; }
.os-btn:is(.os-btn--ghost, .os-btn--soft, .os-btn--danger) .os-btn__icon { background: var(--surface-3); color: var(--b-fg); }
@media (hover: hover) { .os-btn:hover .os-btn__icon { transform: rotate(-45deg); background: var(--ink-0); color: var(--bone); } }
.os-btn--block { width: 100%; justify-content: space-between; }
.os-btn--block:not(.os-btn--icon) { justify-content: center; }
.os-btn--ghost { --b-bg: transparent; --b-fg: var(--text); --b-fill: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
@media (hover: hover) { .os-btn--ghost:hover { color: var(--text); } }
.os-btn--soft { --b-bg: var(--surface-2); --b-fg: var(--text); --b-fill: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); }
@media (hover: hover) { .os-btn--soft:hover { color: var(--text); } }
.os-btn--accent { --b-bg: var(--accent); --b-fg: var(--accent-ink); --b-fill: var(--text); }
@media (hover: hover) { .os-btn--accent:hover { color: var(--bg); } }
.os-btn--danger { --b-bg: transparent; --b-fg: var(--neg); --b-fill: color-mix(in srgb, var(--neg) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--neg) 40%, transparent); }
@media (hover: hover) { .os-btn--danger:hover { color: var(--neg); } }
.os-btn--sm { min-height: 38px; padding: 0 16px; font-size: 13px; gap: 8px; }
.os-btn--sm.os-btn--icon { padding: 0 5px 0 16px; }
.os-btn--sm .os-btn__icon { width: 28px; height: 28px; }
.os-btn[disabled], .os-btn.disabled { opacity: 0.45; pointer-events: none; }

/* loading / success states (qe-os.js toggles on submit) */
.os-btn.is-loading { pointer-events: none; }
.os-btn.is-loading .os-btn__icon svg { opacity: 0; }
.os-btn.is-loading .os-btn__icon::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.6px solid currentColor;
  border-right-color: transparent;
  animation: os-spin 0.7s linear infinite;
}
.os-btn.is-loading:not(.os-btn--icon)::after {
  content: "";
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.6px solid currentColor;
  border-right-color: transparent;
  animation: os-spin 0.7s linear infinite;
}
.os-btn.is-success { --b-bg: var(--pos); --b-fg: var(--ink-0); }
.os-btn.is-success .os-btn__icon svg { opacity: 0; }
.os-btn.is-success .os-btn__icon::after {
  content: "";
  position: absolute;
  width: 12px; height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(-45deg);
  animation: os-pop 0.5s var(--ease-spring);
}
.os-btn__icon { position: relative; }
@keyframes os-pop { from { transform: translateY(-2px) rotate(-45deg) scale(0); } to { transform: translateY(-2px) rotate(-45deg) scale(1); } }

.os-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.os-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.6s var(--ease-out);
}
@media (hover: hover) { .os-link:hover::after { transform-origin: left; transform: scaleX(1); } }
.os-link--accent { color: var(--accent); }

.os-iconbtn {
  position: relative;
  flex: none;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--glass);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.5s var(--ease-out), background 0.3s ease, border-color 0.3s ease;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.os-iconbtn svg { width: 18px; height: 18px; }
@media (hover: hover) { .os-iconbtn:hover { border-color: var(--accent); transform: translateY(-1px); } }
.os-iconbtn:active { transform: scale(0.94); }

/* ───────────────────────── Eyebrows, titles, chips ───────────────────────── */
.os-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}
.os-eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.7; }
.os-eyebrow--dot::before {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 1;
  animation: os-pulse 2.4s var(--ease-io) infinite;
}
.os-eyebrow--plain::before { display: none; }
@keyframes os-pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent), 0 0 12px var(--accent); }
  50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 4%, transparent), 0 0 22px var(--accent); }
}
.os-title {
  font-size: clamp(34px, 7vw, 64px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.96;
}
.os-title--md { font-size: clamp(28px, 5vw, 44px); }
.os-h3 { font-size: 19px; font-weight: 500; letter-spacing: -0.025em; line-height: 1.2; }
.os-lead { color: var(--text-2); font-size: 15.5px; line-height: 1.55; max-width: 40em; }
.os-muted { color: var(--text-3); }
.os-small { font-size: 12.5px; color: var(--text-3); }

.os-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text-2);
  font: 500 12px/1 var(--font-ui);
  white-space: nowrap;
}
.os-chip svg { width: 13px; height: 13px; }
.os-chip--accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); }
.os-chip--pos { color: var(--pos); border-color: color-mix(in srgb, var(--pos) 35%, transparent); background: color-mix(in srgb, var(--pos) 10%, transparent); }
.os-chip--warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.os-chip--neg { color: var(--neg); border-color: color-mix(in srgb, var(--neg) 35%, transparent); background: color-mix(in srgb, var(--neg) 10%, transparent); }
.os-live { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 0 var(--pos); animation: os-live 2s ease-out infinite; }
@keyframes os-live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pos) 60%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }

/* ───────────────────────── App shell ───────────────────────── */
.os-app { padding-top: calc(var(--top-h) + env(safe-area-inset-top)); padding-bottom: calc(var(--dock-h) + 28px + env(safe-area-inset-bottom)); }
.os-app.os-nodock { padding-bottom: 32px; }

.os-top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: calc(var(--top-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--gut) 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.6s var(--ease-out);
  view-transition-name: os-top;
}
.os-top.is-scrolled {
  background: var(--glass);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
}
.os-top__title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.os-top__title h1 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.5s var(--ease-out);
}
.os-top.is-scrolled .os-top__title h1, .os-top--solid .os-top__title h1 { opacity: 1; transform: none; }
.os-top__end { display: flex; align-items: center; gap: 8px; }
.os-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -0.02em; white-space: nowrap; }
.os-brand img { width: 30px; height: 30px; animation: os-spin 40s linear infinite; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 35%, transparent)); }
.os-brand span { color: var(--text-3); font-weight: 400; }
.os-top .os-brand { display: none; }

.os-main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px var(--gut) 0;
}

/* dock (mobile/tablet) */
.os-dock {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 460px);
  height: var(--dock-h);
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  border-radius: 26px;
  background: var(--glass);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  backdrop-filter: blur(22px) saturate(1.5);
  view-transition-name: os-dock;
}
.os-dock__glider {
  position: absolute;
  top: 6px; bottom: 6px; left: 6px;
  width: calc((100% - 12px - 8px) / 5);
  border-radius: 20px;
  background: var(--text);
  transform: translateX(calc(var(--dock-i, 2) * (100% + 2px)));
  transition: transform 0.7s var(--ease-spring);
  z-index: 0;
}
.os-dock a {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 20px;
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
  transition: color 0.4s ease;
  -webkit-tap-highlight-color: transparent;
}
.os-dock a svg { width: 21px; height: 21px; transition: transform 0.6s var(--ease-spring); }
.os-dock a.active { color: var(--bg); }
.os-dock a.active svg { transform: translateY(-1px) scale(1.06); }
.os-dock a:active svg { transform: scale(0.86); }
@media (hover: hover) { .os-dock a:not(.active):hover { color: var(--text); } .os-dock a:not(.active):hover svg { transform: translateY(-2px); } }

/* rail (desktop) */
.os-rail { display: none; }
@media (min-width: 1100px) {
  .os-app { padding-left: var(--rail-w); padding-bottom: 40px; }
  .os-dock { display: none; }
  .os-top { left: var(--rail-w); }
  .os-top .os-menu-btn { display: none; }
  .os-rail {
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 61;
    inset: 0 auto 0 0;
    width: var(--rail-w);
    padding: 22px 16px 20px;
    border-right: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    view-transition-name: os-rail;
  }
  .os-rail .os-brand { padding: 4px 10px 22px; }
  .os-rail__nav { flex: 1; overflow-y: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; }
  .os-rail__nav::-webkit-scrollbar { display: none; }
  .os-rail__group { margin: 16px 0 6px; padding: 0 12px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-3); }
  .os-rail__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease, background 0.3s ease, transform 0.5s var(--ease-out);
  }
  .os-rail__link svg { width: 18px; height: 18px; flex: none; opacity: 0.85; }
  .os-rail__link:hover { color: var(--text); background: var(--surface-2); transform: translateX(3px); }
  .os-rail__link.active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
  .os-rail__link.active::before {
    content: "";
    position: absolute;
    left: -16px; top: 10px; bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent);
  }
  .os-rail__link .os-count { margin-left: auto; }
  .os-rail__me {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-top: 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
  }
  .os-rail__me b { display: block; font-size: 13.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .os-rail__me small { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); letter-spacing: 0.04em; }
  .os-rail__me > div { min-width: 0; flex: 1; }
  .os-main { padding-top: 12px; }
}
.os-count {
  min-width: 18px; height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--neg);
  color: #fff;
  font: 600 10.5px/18px var(--font-ui);
  text-align: center;
}
.os-avatar {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(from 200deg, var(--accent), var(--ember), var(--accent));
  color: var(--ink-0);
  font: 600 13px/1 var(--font-ui);
  position: relative;
}
.os-avatar::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--surface); }
.os-avatar > * { position: relative; z-index: 1; color: var(--text); }

/* full-screen menu (#sidebarPanel, bootstrap modal) */
.modal.os-menu { padding: 0 !important; }
.modal.os-menu .modal-dialog {
  max-width: none;
  width: 100%;
  height: 100%;
  margin: 0;
  transform: none !important;
}
.modal.os-menu .modal-content {
  height: 100%;
  border: 0;
  border-radius: 0;
  background: var(--bg-2);
  color: var(--text);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.75s var(--ease-io);
}
.modal.os-menu.show .modal-content { clip-path: inset(0 0 0 0); }
.modal.os-menu .modal-body {
  padding: calc(18px + env(safe-area-inset-top)) var(--gut) calc(28px + env(safe-area-inset-bottom));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.os-menu__head { display: flex; align-items: center; gap: 14px; }
.os-menu__head .os-me { flex: 1; min-width: 0; }
.os-menu__head .os-me b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-menu__head .os-me small { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.os-menu__bal {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.os-menu__bal .os-num { font-size: 40px; }
.os-menu__list { list-style: none; margin: 0; padding: 0; }
.os-menu__list li { overflow: hidden; border-bottom: 1px solid var(--line); }
.os-menu__list a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0;
  font-size: clamp(26px, 7.4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
  transform: translateY(105%);
  transition: transform 0.8s var(--ease-out), color 0.3s ease;
}
.os-menu__list a small { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--text-3); min-width: 22px; }
.os-menu__list a:hover, .os-menu__list a.active { color: var(--accent); }
.os-menu__list a .os-count { align-self: center; }
.modal.os-menu.show .os-menu__list a { transform: none; }
.os-menu__cols { display: grid; gap: 22px; }
.os-menu__cols h6 { font-family: var(--font-mono) !important; font-size: 10.5px !important; letter-spacing: 0.2em !important; text-transform: uppercase; color: var(--text-3) !important; font-weight: 400 !important; margin-bottom: 4px !important; }
@media (min-width: 720px) { .os-menu__cols { grid-template-columns: repeat(3, 1fr); gap: 32px; } .os-menu__list a { font-size: 30px; } }
.os-menu__foot { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.modal.os-menu .os-menu__list li:nth-child(1) a { transition-delay: 0.08s; }
.modal.os-menu .os-menu__list li:nth-child(2) a { transition-delay: 0.12s; }
.modal.os-menu .os-menu__list li:nth-child(3) a { transition-delay: 0.16s; }
.modal.os-menu .os-menu__list li:nth-child(4) a { transition-delay: 0.2s; }
.modal.os-menu .os-menu__list li:nth-child(5) a { transition-delay: 0.24s; }
.modal.os-menu .os-menu__list li:nth-child(6) a { transition-delay: 0.28s; }
.modal.os-menu .os-menu__list li:nth-child(7) a { transition-delay: 0.32s; }
.modal-backdrop:has(+ .os-menu), .os-menu.show ~ .modal-backdrop { opacity: 0 !important; }

/* ───────────────────────── Page hero ───────────────────────── */
.os-phero { position: relative; padding: 18px 0 26px; }
.os-phero__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.os-phero .os-title { max-width: 14ch; }
.os-phero .os-lead { margin-top: 14px; }
.os-phero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.os-phero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.os-phero__meta b { color: var(--text); font-weight: 500; }
.os-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: color 0.3s ease, gap 0.5s var(--ease-out);
}
.os-back svg { width: 14px; height: 14px; }
.os-back:hover { color: var(--text); gap: 12px; }

/* ───────────────────────── Surfaces ───────────────────────── */
.os-card {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 20px;
  isolation: isolate;
  overflow: hidden;
}
.os-card--flat { box-shadow: none; background: var(--surface-2); }
.os-card--ink {
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%), var(--ink-1);
  color: var(--bone);
  border-color: rgba(237, 234, 226, 0.1);
  --text: var(--bone);
  --text-2: rgba(237, 234, 226, 0.66);
  --text-3: rgba(237, 234, 226, 0.42);
  --line: rgba(237, 234, 226, 0.1);
  --line-2: rgba(237, 234, 226, 0.18);
  --surface-2: rgba(237, 234, 226, 0.06);
  --surface-3: rgba(237, 234, 226, 0.1);
  --accent: var(--signal);
  --accent-ink: var(--ink-0);
  --btn-bg: var(--bone);
  --btn-fg: var(--ink-0);
  --btn-fill: var(--signal);
  --pos: var(--mint);
  --neg: var(--rose);
  --warn: var(--ember);
}
.os-card--ink h1, .os-card--ink h2, .os-card--ink h3, .os-card--ink h4, .os-card--ink h5 { color: var(--bone) !important; }
.os-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.os-card__head .os-eyebrow { color: var(--text-3); }
.os-spot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -30%), color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
@media (hover: hover) { .os-spot:hover::after { opacity: 1; } }
.os-grid { display: grid; gap: 14px; }
.os-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .os-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .os-grid--md-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .os-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .os-grid--lg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.os-stack { display: grid; gap: 14px; }
.os-section { margin-top: 30px; }
.os-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.os-section__head h2 { font-size: 22px; letter-spacing: -0.035em; }
.os-section__head h2 em { font-family: var(--font-display); font-style: italic; font-weight: 400; color: var(--accent); }

/* numbers */
.os-num {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: clamp(34px, 9vw, 60px);
  letter-spacing: -0.05em;
  line-height: 0.92;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.os-num--md { font-size: clamp(24px, 5vw, 32px); letter-spacing: -0.04em; }
.os-num--sm { font-size: 20px; letter-spacing: -0.03em; }
.os-unit { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 0.5em; letter-spacing: 0; color: var(--accent); margin-left: 4px; }

/* stat tiles */
.os-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 118px;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.6s var(--ease-out), border-color 0.4s ease;
}
@media (hover: hover) { .os-stat:hover { transform: translateY(-3px); border-color: var(--line-2); } }
.os-stat__label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); line-height: 1.45; }
.os-stat:has(.os-stat__icon) .os-stat__label { padding-right: 36px; }
.os-stat__label small { display: block; letter-spacing: 0.06em; text-transform: none; font-size: 10.5px; margin-top: 2px; opacity: 0.85; }
.os-stat__value { margin-top: auto; font-size: clamp(21px, 5.4vw, 28px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.os-stat__icon {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text-2);
}
.os-stat__icon svg { width: 15px; height: 15px; }
.os-stat--pos .os-stat__value { color: var(--pos); }
.os-stat--neg .os-stat__value { color: var(--neg); }
.os-stat--accent .os-stat__icon { background: var(--accent-soft); color: var(--accent); }
.os-stat__spark { position: absolute; left: 0; right: 0; bottom: 0; height: 46px; opacity: 0.5; z-index: -1; }

/* pending values shimmer until JS writes real data */
.os-pending {
  color: transparent !important;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%) 0 0 / 300% 100%;
  animation: os-shimmer 1.3s linear infinite;
  min-width: 3ch;
  display: inline-block;
}
@keyframes os-shimmer { to { background-position: -300% 0; } }
.os-flash { animation: os-flash 1.2s var(--ease-out); }
@keyframes os-flash { 0% { text-shadow: 0 0 22px var(--accent); } 100% { text-shadow: none; } }

/* rows / key-value list */
.os-kv { display: grid; }
.os-kv > div, .os-kv > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.os-kv > :last-child { border-bottom: 0; }
.os-kv span:first-child { color: var(--text-2); }
.os-kv strong, .os-kv b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }

.os-list { display: grid; }
.os-list > a, .os-list > div, .os-list > button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: padding 0.5s var(--ease-out), background 0.3s ease;
}
.os-list > :last-child { border-bottom: 0; }
@media (hover: hover) { .os-list > a:hover, .os-list > button:hover { padding-left: 10px; } }
.os-list__icon { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.os-list__icon svg { width: 17px; height: 17px; }
.os-list__body { flex: 1; min-width: 0; }
.os-list__body b { display: block; font-weight: 500; font-size: 14.5px; }
.os-list__body small { display: block; color: var(--text-3); font-size: 12.5px; line-height: 1.45; margin-top: 2px; }
.os-list__end { flex: none; display: flex; align-items: center; gap: 8px; color: var(--text-3); }
.os-list__end svg { width: 16px; height: 16px; transition: transform 0.5s var(--ease-out); }
@media (hover: hover) { .os-list > a:hover .os-list__end svg, .os-list > button:hover .os-list__end svg { transform: translateX(3px); } }

/* ───────────────────────── Forms (keeps base.js .form-group/.input-wrapper/.clear-input contract) ───────────────────────── */
body.os .form-group.basic { position: relative; padding: 0; margin: 0 0 18px; }
body.os .form-group.basic:last-child { margin-bottom: 0; }
body.os .input-wrapper { position: relative; }
body.os .form-group.basic .label, body.os .os-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: color 0.3s ease;
}
body.os .form-group.basic .label [data-os-n] , body.os .os-label i { font-style: normal; color: var(--accent); }
body.os .input-wrapper.active .label { color: var(--accent); }
body.os .form-control,
body.os .form-select {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 44px 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background-color: var(--surface-2);
  color: var(--text);
  font: 500 15.5px/1.2 var(--font-ui);
  letter-spacing: -0.01em;
  box-shadow: none;
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.4s var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}
body.os textarea.form-control { height: auto; min-height: 110px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
body.os .form-control::placeholder { color: var(--text-3); opacity: 1; font-weight: 400; }
body.os .form-control:hover, body.os .form-select:hover { border-color: color-mix(in srgb, var(--text) 26%, transparent); }
body.os .form-control:focus,
body.os .form-select:focus {
  outline: none;
  border-color: var(--accent);
  background-color: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 10px 30px -18px var(--accent);
  color: var(--text);
}
body.os .form-control[readonly] { background-color: transparent; border-style: dashed; color: var(--text-2); }
body.os .form-control:user-invalid:not(:focus):not(:placeholder-shown) { border-color: color-mix(in srgb, var(--neg) 60%, transparent); }
body.os .form-control.is-valid-os { border-color: color-mix(in srgb, var(--pos) 55%, transparent); }
body.os .form-select, body.os select.form-control {
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23888' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='M4 6l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px 14px;
  cursor: pointer;
}
body.os .form-select-sm { height: 40px; font-size: 13.5px; border-radius: 11px; padding-left: 12px; }
body.os input[type="date"].form-control { padding-right: 12px; }
body.os input[type="number"].form-control { -moz-appearance: textfield; }
body.os .input-info { margin-top: 8px; font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
body.os .clear-input {
  position: absolute;
  right: 8px;
  bottom: 10px;
  width: 32px; height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-3);
  cursor: pointer;
  font-size: 18px;
  transition: color 0.3s ease, background 0.3s ease, transform 0.4s var(--ease-spring);
}
body.os .clear-input:hover { color: var(--text); background: var(--surface-3); }
body.os .input-wrapper.not-empty .clear-input { display: flex; animation: os-in-pop 0.4s var(--ease-spring); }
@keyframes os-in-pop { from { transform: scale(0.4); opacity: 0; } }
body.os .clear-input ion-icon { font-size: 18px; }

/* field with leading icon, validation tick */
.os-field-state {
  position: absolute;
  right: 14px;
  bottom: 17px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--pos);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.3s ease, transform 0.5s var(--ease-spring);
  pointer-events: none;
}
.os-field-state::after { content: ""; position: absolute; left: 5px; top: 5px; width: 8px; height: 4px; border-left: 1.6px solid var(--ink-0); border-bottom: 1.6px solid var(--ink-0); transform: rotate(-45deg); }
.input-wrapper.is-valid-os .os-field-state { opacity: 1; transform: none; }
.input-wrapper.is-valid-os.not-empty .os-field-state { right: 46px; }

/* checkbox / radio / switch */
body.os .form-check { display: flex; align-items: flex-start; gap: 10px; min-height: 0; padding: 0; margin: 0; }
body.os .form-check-input {
  flex: none;
  float: none;
  width: 20px; height: 20px;
  margin: 1px 0 0;
  border: 1.5px solid var(--line-2);
  background-color: var(--surface-2);
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
body.os .form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
body.os .form-check-input:focus { box-shadow: 0 0 0 4px var(--accent-soft); border-color: var(--accent); }
body.os .form-check-label { color: var(--text-2); cursor: pointer; }
body.os .form-switch { padding: 0; }
body.os .form-switch .form-check-input {
  width: 52px; height: 30px;
  margin: 0;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background-color: var(--surface-3);
  background-image: none;
  position: relative;
  -webkit-appearance: none;
  appearance: none;
}
body.os .form-switch .form-check-input::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.6s var(--ease-spring), background 0.3s ease;
}
body.os .form-switch .form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
body.os .form-switch .form-check-input:checked::after { transform: translateX(22px); background: var(--ink-0); }

/* choice cards (radio groups) */
.os-choices { display: grid; gap: 10px; }
@media (min-width: 480px) { .os-choices--2 { grid-template-columns: 1fr 1fr; } }
.os-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.5s var(--ease-out);
}
.os-choice:hover { transform: translateY(-2px); }
.os-choice .form-check-input { position: absolute; top: 16px; right: 16px; margin: 0; border-radius: 50%; }
.os-choice:has(:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); }
.os-choice .form-check-label { font-weight: 600; color: var(--text); padding-right: 30px; }
.os-choice small { color: var(--text-3); font-size: 12.5px; }
.os-choice small strong { color: var(--text); font-weight: 600; }

/* file drop */
.custom-file-upload.os-drop { position: relative; width: 100%; margin: 0 0 18px; }
.custom-file-upload.os-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.custom-file-upload.os-drop label {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 150px;
  padding: 22px;
  border-radius: 18px;
  border: 1.5px dashed var(--line-2);
  background: repeating-linear-gradient(-45deg, transparent 0 12px, var(--surface-2) 12px 13px), var(--surface);
  color: var(--text-2);
  text-align: center;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.custom-file-upload.os-drop:hover label, .custom-file-upload.os-drop.is-drag label { border-color: var(--accent); color: var(--text); }
.custom-file-upload.os-drop label span, .custom-file-upload.os-drop label strong { display: grid; place-items: center; gap: 8px; font-weight: 500; }
.custom-file-upload.os-drop label i { font-style: normal; }
.custom-file-upload.os-drop ion-icon { font-size: 30px; color: var(--accent); }
.custom-file-upload.os-drop.file-uploaded label, .custom-file-upload.os-drop label.file-uploaded { border-style: solid; border-color: var(--pos); color: var(--text); }

/* ───────────────────────── Modals (bootstrap mechanics, QE surfaces) ───────────────────────── */
body.os .modal-backdrop { background: color-mix(in srgb, var(--ink-0) 70%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
body.os .modal-backdrop.show { opacity: 1; }
body.os .modal-content {
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
body.os .modal-header { display: block; padding: 22px 22px 6px; border: 0; }
body.os .modal-title { font-size: 21px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.2; }
body.os .modal-body { padding: 16px 22px; color: var(--text-2); }
body.os .modal-footer { display: block; padding: 8px 22px 22px; border: 0; }
body.os .modal-footer > * { margin: 0; }
.os-modal-actions { display: flex; gap: 10px; }
.os-modal-actions > * { flex: 1; }
.os-modal-actions--stack { flex-direction: column; }
body.os .modal.dialogbox .modal-dialog, body.os .modal.os-dialog .modal-dialog { max-width: 460px; margin: 0 auto; min-height: 100%; display: flex; align-items: center; padding: 16px; }
body.os .modal.dialogbox .modal-content, body.os .modal.os-dialog .modal-content { width: 100%; }
body.os .modal.fade .modal-dialog { transform: translateY(24px) scale(0.97); opacity: 0; transition: transform 0.55s var(--ease-out), opacity 0.35s ease; }
body.os .modal.show .modal-dialog { transform: none; opacity: 1; }
body.os .modal-dialog-scrollable .modal-content { max-height: calc(100dvh - 32px); }
body.os .modal-dialog-scrollable .modal-body { overflow-y: auto; }

/* bottom sheet (action-sheet) */
body.os .modal.action-sheet .modal-dialog {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  margin: 0 auto;
  max-width: 560px;
  width: 100%;
  min-height: 0;
  padding: 0;
  transform: translateY(100%);
  opacity: 1;
  transition: transform 0.6s var(--ease-out);
}
body.os .modal.action-sheet.show .modal-dialog { transform: none; }
body.os .modal.action-sheet .modal-content {
  border-radius: 28px 28px 0 0;
  border-bottom: 0;
  max-height: 92dvh;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
}
body.os .modal.action-sheet .modal-content::before {
  content: "";
  display: block;
  width: 42px; height: 4px;
  margin: 10px auto 0;
  border-radius: 4px;
  background: var(--line-2);
}
@media (min-width: 720px) {
  body.os .modal.action-sheet .modal-dialog { position: relative; min-height: 100%; display: flex; align-items: center; padding: 16px; transform: translateY(24px) scale(0.97); opacity: 0; transition: transform 0.55s var(--ease-out), opacity 0.35s ease; }
  body.os .modal.action-sheet.show .modal-dialog { transform: none; opacity: 1; }
  body.os .modal.action-sheet .modal-content { border-radius: var(--r-lg); border-bottom: 1px solid var(--line-2); max-height: calc(100dvh - 32px); }
  body.os .modal.action-sheet .modal-content::before { display: none; }
}
.action-sheet-content { padding: 0; }
body.os .os-sheet-close { position: absolute; top: 16px; right: 16px; z-index: 2; }
body.os .modal.action-sheet .os-sheet-close ~ .modal-header { padding-right: 70px; }

/* ───────────────────────── Toasts (.toast-box.show toggled by base.js) ───────────────────────── */
body.os .toast-box {
  position: fixed;
  z-index: 10000;
  left: 50%;
  bottom: calc(var(--dock-h) + 26px + env(safe-area-inset-bottom));
  top: auto;
  width: min(calc(100% - 24px), 440px);
  min-height: 0;
  padding: 0;
  display: block;
  border-radius: 18px;
  background: var(--ink-2) !important;
  color: var(--bone);
  border: 1px solid rgba(237, 234, 226, 0.14);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.7);
  transform: translate(-50%, 140%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.7s var(--ease-spring), opacity 0.35s ease;
  overflow: hidden;
}
body.os.os-nodock .toast-box, body.os.os-authpage .toast-box { bottom: calc(22px + env(safe-area-inset-bottom)); }
@media (min-width: 1100px) { body.os .toast-box { bottom: 28px; left: calc(50% + var(--rail-w) / 2); } body.os.os-authpage .toast-box { left: 50%; } }
body.os .toast-box.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
body.os .toast-box .in { display: flex; align-items: center; gap: 12px; padding: 14px 16px 16px 14px; }
body.os .toast-box .in::before {
  content: "";
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--signal) center / 14px no-repeat;
}
body.os .toast-box .text { flex: 1; font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--bone); }
body.os .toast-box::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 100%;
  background: currentColor;
  transform-origin: left;
  transform: scaleX(0);
}
body.os .toast-box.show::after { animation: os-toastbar 4s linear forwards; }
@keyframes os-toastbar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
body.os .toast-box.bg-success { color: var(--mint); }
body.os .toast-box.bg-success .in::before { background-color: var(--mint); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23050608' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3e%3c/svg%3e"); }
body.os .toast-box.bg-danger { color: var(--rose); }
body.os .toast-box.bg-danger .in::before { background-color: var(--rose); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23050608' stroke-width='2' stroke-linecap='round' d='M8 4v5M8 12h.01'/%3e%3c/svg%3e"); }
body.os .toast-box.bg-secondary { color: var(--signal); }
body.os .toast-box.bg-secondary .in::before { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23050608' stroke-width='2' stroke-linecap='round' d='M8 7v5M8 4h.01'/%3e%3c/svg%3e"); }
body.os .toast-box.bg-success, body.os .toast-box.bg-danger, body.os .toast-box.bg-secondary { background: var(--ink-2) !important; }

/* shake on error */
.os-shake { animation: os-shake 0.55s var(--ease-out); }
@keyframes os-shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }

/* ───────────────────────── Legacy utility remaps used by app.js markup ───────────────────────── */
body.os .text-success { color: var(--pos) !important; }
body.os .text-danger { color: var(--neg) !important; }
body.os .text-warning { color: var(--warn) !important; }
body.os .text-info, body.os .text-primary { color: var(--accent) !important; }
body.os .text-secondary, body.os .text-muted { color: var(--text-3) !important; }
body.os .text-black, body.os .text-dark { color: var(--text) !important; }
body.os .text-white { color: var(--bone) !important; }
body.os .small, body.os small { font-size: 12.5px; }
body.os .badge { border-radius: 999px; font-weight: 600; font-size: 10.5px; padding: 4px 7px; }
body.os .bg-danger.badge { background: var(--neg) !important; }
body.os .spinner-border { color: var(--accent); }
body.os .alert { border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); padding: 14px 16px; }
body.os .alert strong { color: var(--text); }
body.os .alert-warning { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); }
body.os .alert-secondary { background: var(--surface-2); }
body.os hr { border-color: var(--line); opacity: 1; }

/* JS-generated bootstrap buttons inside lists (.os-btn opts out) */
body.os .btn:not(.os-btn) {
  --bs-btn-padding-x: 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
  transition: transform 0.4s var(--ease-out), background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
body.os .btn:not(.os-btn):active { transform: scale(0.96); }
body.os .btn-primary:not(.os-btn) { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
body.os .btn-primary:not(.os-btn):hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
body.os :is(.btn-outline-primary, .btn-outline-secondary):not(.os-btn) { background: transparent; border: 1px solid var(--line-2); color: var(--text); }
body.os :is(.btn-outline-primary, .btn-outline-secondary):not(.os-btn):hover { background: var(--surface-3); border-color: var(--line-2); color: var(--text); }
body.os .btn-outline-danger:not(.os-btn) { background: transparent; border: 1px solid color-mix(in srgb, var(--neg) 45%, transparent); color: var(--neg); }
body.os .btn-outline-danger:not(.os-btn):hover { background: color-mix(in srgb, var(--neg) 12%, transparent); color: var(--neg); }
body.os .btn-sm:not(.os-btn) { padding: 6px 14px; font-size: 12.5px; }
body.os .btn.disabled, body.os .btn:disabled { opacity: 0.45; pointer-events: none; }
body.os .btn-early-exit {
  flex-basis: 100%;
  height: 40px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--neg) 40%, transparent);
  background: transparent;
  color: var(--neg);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.4s var(--ease-out);
}
body.os .btn-early-exit:hover { background: color-mix(in srgb, var(--neg) 12%, transparent); color: var(--neg); }
@media (min-width: 720px) { body.os .btn-early-exit { flex-basis: auto; margin-left: 50px; padding: 0 20px; } }

/* resend link state (startCountdown toggles .disabled / .text-primary) */
body.os .form-links a.disabled { pointer-events: none; opacity: 0.4; }

/* Bootstrap utilities are !important inside @layer legacy, which beats any unlayered !important.
   `osfix` is declared before `legacy` in each page head, so its !important rules win. */
@layer osfix {
  body.os .toast-box.bg-success, body.os .toast-box.bg-danger, body.os .toast-box.bg-secondary { background-color: var(--ink-2) !important; }
  body.os .text-success { color: var(--pos) !important; }
  body.os .text-danger { color: var(--neg) !important; }
  body.os .text-warning { color: var(--warn) !important; }
  body.os .text-info, body.os .text-primary { color: var(--accent) !important; }
  body.os .text-secondary, body.os .text-muted { color: var(--text-3) !important; }
  body.os .text-black, body.os .text-dark { color: var(--text) !important; }
  body.os .text-white { color: var(--bone) !important; }
  body.os .bg-danger.badge { background-color: var(--neg) !important; }
  body.os .os-card--ink :is(h1, h2, h3, h4, h5) { color: var(--bone) !important; }
  body.os .os-ledger .item .price .float-end { float: none !important; }
  body.os .os-ledger .item .price.text-black { color: var(--text-3) !important; }
  body.os .os-ledger .source-of-funds-wrap { margin-top: 12px !important; }
  body.os .os-ledger .source-of-funds-wrap label { margin: 0 !important; }
  body.os .os-resend__txt a.text-primary { color: var(--accent) !important; }
  body.os .os-stage__title { color: var(--bone) !important; }
  body.os #supPager.d-flex[style*="none"] { display: none !important; }
  body.os .os-choice .form-check-label:is(.text-info, .text-primary) { color: var(--text) !important; }
  body.os .os-queue .icon-box:is(.bg-warning, .bg-success, .bg-danger) { background-color: color-mix(in srgb, var(--c) 13%, transparent) !important; }
  body.os .os-sup-field label.text-muted { color: var(--text-3) !important; }
  body.os .avatar-section img.rounded { border-radius: 50% !important; }
}

/* ───────────────────────── Ledger (JS-rendered .transactions .item rows) ───────────────────────── */
.os-ledger { display: grid; gap: 0; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.os-ledger:empty { min-height: 180px; background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%) 0 0 / 300% 100%; animation: os-shimmer 1.4s linear infinite; }
.os-ledger > .item {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  animation: os-row-in 0.7s var(--ease-out) both;
  animation-delay: calc(min(var(--row, 0), 14) * 40ms);
  transition: background 0.3s ease;
}
.os-ledger > .item:last-child { border-bottom: 0; }
@media (hover: hover) { .os-ledger > a.item:hover { background: var(--surface-2); } }
@keyframes os-row-in { from { opacity: 0; transform: translateY(12px); } }
.os-ledger .item .detail { display: flex; align-items: flex-start; gap: 12px; min-width: 0; flex: 1; }
.os-ledger .item .detail::before {
  content: attr(data-os-glyph);
  flex: none;
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--accent);
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0;
}
.os-ledger .item .detail > div { min-width: 0; }
.os-ledger .item .detail strong { display: block; font-weight: 500; font-size: 14.5px; line-height: 1.3; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.os-ledger .item .detail p { margin-top: 3px; color: var(--text-3); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.02em; }
.os-ledger .item .right { flex: none; display: grid; justify-items: end; gap: 4px; text-align: right; max-width: 55%; }
.os-ledger .item .price { display: flex; align-items: baseline; justify-content: flex-end; gap: 10px; font-size: 15px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.os-ledger .item .price > span:first-child:not(:only-child) { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); font-weight: 400; }
.os-ledger .item .price .float-end { float: none !important; }
.os-ledger .item .price.text-black { font-size: 12px; font-weight: 400; color: var(--text-3) !important; }
.os-ledger .item .price.text-success:not(:has(span))::before, .os-ledger .item .price.text-success > span:only-child::before { content: "+"; opacity: 0.7; margin-right: 1px; }
/* empty state: a single row with no right column */
.os-ledger > .item:only-child:not(:has(.right)) {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px 44px;
  border: 0;
}
.os-ledger > .item:only-child:not(:has(.right)) .detail { flex-direction: column; align-items: center; }
.os-ledger > .item:only-child:not(:has(.right)) .detail::before {
  content: "";
  width: 112px; height: 84px;
  border: 0;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 112 84' fill='none'%3e%3crect x='16' y='14' width='80' height='56' rx='10' stroke='%238fe3ff' stroke-opacity='.5'/%3e%3cpath d='M28 54l14-14 10 8 16-18 16 12' stroke='%238fe3ff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3e%3ccircle cx='84' cy='42' r='3' fill='%23ffb36b'/%3e%3cpath d='M28 26h22M28 32h12' stroke='%23edeae2' stroke-opacity='.3' stroke-linecap='round'/%3e%3c/svg%3e") center / contain no-repeat;
  margin-bottom: 8px;
  animation: os-float 6s var(--ease-io) infinite alternate;
}
.os-ledger > .item:only-child:not(:has(.right)) strong { font-size: 16px; color: var(--text-2); }
@keyframes os-float { from { transform: translateY(-4px); } to { transform: translateY(4px); } }
.os-ledger .source-of-funds-wrap { margin-top: 12px !important; display: grid; gap: 8px; max-width: 320px; }
.os-ledger .source-of-funds-wrap label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin: 0 !important; }
.os-ledger .source-of-funds-wrap .btn { justify-self: start; }
.os-ledger .item .detail p.small { font-family: var(--font-ui); font-size: 12.5px; }

/* insight strip above ledgers (qe-os.js computes from rows) */
.os-insight { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.os-insight__cell { padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.os-insight__cell span { display: block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.os-insight__cell b { display: block; margin-top: 8px; font-size: clamp(17px, 4.6vw, 24px); font-weight: 500; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.05; }
.os-insight__chart { grid-column: 1 / -1; padding: 16px 16px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.os-insight__chart header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.os-insight__chart svg { width: 100%; height: 110px; display: block; overflow: visible; }

/* ───────────────────────── Tables (deposit/coupons/admin) ───────────────────────── */
.os-table-card { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
body.os .table-responsive { margin: 0; }
body.os .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--line);
  --bs-table-striped-bg: var(--surface-2);
  --bs-table-hover-bg: var(--surface-2);
  color: var(--text);
  margin: 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
body.os .table > :not(caption) > * > * { padding: 14px 16px; border-bottom-color: var(--line); background: transparent; color: inherit; vertical-align: middle; }
body.os .table thead th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
  border-bottom: 1px solid var(--line-2);
  background: var(--surface-2);
}
body.os .table > :not(:first-child) { border-top: 0; }
body.os .table tbody tr { animation: os-row-in 0.6s var(--ease-out) both; transition: background 0.3s ease; }
@media (hover: hover) { body.os .table tbody tr:hover { background: var(--surface-2); } }
body.os .table tbody tr:last-child > * { border-bottom: 0; }
body.os .table td[colspan] { text-align: center; color: var(--text-3); padding: 40px 16px; }
body.os .table img { border-radius: 8px; }

/* ───────────────────────── Tabs / segmented ───────────────────────── */
.os-seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.os-seg::-webkit-scrollbar { display: none; }
.os-seg > * { flex: none; }

/* ───────────────────────── Charts ───────────────────────── */
.os-donut { position: relative; width: 132px; aspect-ratio: 1; flex: none; }
.os-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.os-donut circle { fill: none; stroke-width: 10; }
.os-donut .os-donut__track { stroke: var(--surface-3); }
.os-donut .os-donut__a { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray 1.6s var(--ease-out); }
.os-donut .os-donut__b { stroke: var(--ember); stroke-linecap: round; transition: stroke-dasharray 1.6s var(--ease-out), stroke-dashoffset 1.6s var(--ease-out); }
.os-donut__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.os-donut__center b { font-size: 26px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.os-donut__center small { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin-top: 4px; }
.os-legend { display: grid; gap: 10px; }
.os-legend div { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.os-legend div b { margin-left: auto; color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.os-legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; background: var(--accent); }
.os-legend i.is-b { background: var(--ember); }
.os-legend i.is-c { background: var(--mint); }
.os-legend i.is-d { background: var(--text-3); }
.os-bars { display: grid; gap: 14px; }
.os-bar header { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.os-bar header b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.os-bar__track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.os-bar__fill { height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 50%, var(--ember))); transform-origin: left; transform: scaleX(var(--v, 0)); transition: transform 1.4s var(--ease-out); }
.os-ring { --p: 0; position: relative; width: 58px; height: 58px; flex: none; }
.os-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.os-ring circle { fill: none; stroke-width: 5; }
.os-ring circle:first-child { stroke: var(--surface-3); }
.os-ring circle + circle { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: calc(100 - var(--p) * 100); transition: stroke-dashoffset 1.2s var(--ease-out); }
.os-ring span { position: absolute; inset: 0; display: grid; place-items: center; font: 500 13px/1 var(--font-ui); font-variant-numeric: tabular-nums; }
.os-spark path.os-spark__line { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.os-spark path.os-spark__area { fill: url(#os-spark-grad); opacity: 0.9; }
.os-draw { stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000); animation: os-draw 1.8s var(--ease-out) forwards; }
@keyframes os-draw { to { stroke-dashoffset: 0; } }
.os-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font: 500 12px/1.3 var(--font-ui);
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 10px));
  opacity: 0;
  transition: opacity 0.2s ease;
}
.os-tip.is-on { opacity: 1; }

/* ───────────────────────── Footer ───────────────────────── */
.os-foot {
  margin-top: 48px;
  padding: 26px 0 8px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-3);
}
.os-foot__word {
  display: block;
  width: 100%;
  font-size: clamp(54px, 15vw, 150px);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-2);
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  transition: -webkit-text-stroke-color 0.6s ease;
}
.os-foot__word:hover { -webkit-text-stroke-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.os-social { display: flex; gap: 8px; }
.os-social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--text-2); transition: color 0.3s ease, border-color 0.3s ease, transform 0.5s var(--ease-spring); }
.os-social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px) rotate(-6deg); }
.os-social svg { width: 16px; height: 16px; }

/* ───────────────────────── Motion primitives ───────────────────────── */
.os-rv { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.os-rv.is-in { opacity: 1; transform: none; }
.os-split .os-line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.os-split .os-line > span { display: inline-block; transform: translate3d(0, 105%, 0) rotate(2deg); transform-origin: 0 100%; transition: transform 1.1s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms + 80ms); }
.os-split.is-in .os-line > span { transform: none; }
html:not(.os-js) .os-rv { opacity: 1; transform: none; }
html:not(.os-js) .os-split .os-line > span { transform: none; }

.os-cursor { position: fixed; left: 0; top: 0; z-index: 250; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 1px solid rgba(237, 234, 226, 0.55); pointer-events: none; opacity: 0; mix-blend-mode: difference; transition: width 0.4s var(--ease-out), height 0.4s var(--ease-out), margin 0.4s var(--ease-out), background 0.4s ease, opacity 0.3s ease; }
.os-cursor.is-on { opacity: 1; }
.os-cursor.is-hover { width: 58px; height: 58px; margin: -29px 0 0 -29px; background: var(--bone); }
@media (hover: none) { .os-cursor { display: none; } }

/* ═════════════════════════ DASHBOARD ═════════════════════════ */
.os-iconbtn { position: relative; }
.os-iconbtn__badge { position: absolute; top: -3px; right: -3px; box-shadow: 0 0 0 2px var(--bg); }
.os-avatar--lg { width: 54px; height: 54px; font-size: 17px; }

.os-dash-hero { padding: 22px; min-height: 340px; display: flex; flex-direction: column; gap: 22px; border-radius: 30px; }
.os-dash-hero__field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.85; -webkit-mask-image: linear-gradient(200deg, #000 20%, transparent 75%); mask-image: linear-gradient(200deg, #000 20%, transparent 75%); }
.os-dash-hero__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.os-dash-hero__top .os-eyebrow { color: var(--text-2); }
.os-dash-hero__date { font-size: 11px; letter-spacing: 0.08em; color: var(--text-3); }
.os-dash-hero__id { display: flex; align-items: center; gap: 14px; }
.os-dash-hero__who { min-width: 0; flex: 0 1 auto; }
.os-dash-hero__name {
  margin: 0;
  font-size: clamp(22px, 5.4vw, 30px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.6s var(--ease-out);
}
.os-dash-hero__name:hover, .os-dash-hero__name:focus-visible { background-size: 100% 1px; outline: 0; }
.os-dash-hero__handle { margin: 4px 0 0; font-size: 13.5px; color: var(--text-2); }
.os-dash-hero__handle .os-mono { color: var(--accent); margin-right: 1px; }
body.os .qe-profile-edit-hint { margin: 0; cursor: pointer; flex: none; transition: background 0.3s ease, color 0.3s ease, transform 0.5s var(--ease-spring); }
body.os .qe-profile-edit-hint:hover { background: var(--surface-3); color: var(--text); transform: rotate(-3deg); }
.os-dash-hero__metric { margin-top: auto; }
.os-dash-hero__metric .os-eyebrow { color: var(--text-3); }
.os-dash-hero__metric .os-num { margin: 12px 0 0; font-size: clamp(48px, 13vw, 96px); overflow-wrap: anywhere; }
.os-dash-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.os-refer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 8px 0 18px;
  border-radius: 999px;
  border: 1px dashed var(--line-2);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.os-refer:hover { border-color: var(--accent); background: var(--surface-2); }
.os-refer:active { transform: scale(0.98); }
.os-refer__label { font-size: 13px; color: var(--text-2); }
.os-refer__code { font: 500 14px/1 var(--font-mono); color: var(--text); letter-spacing: 0.04em; }
.os-refer__icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--accent); transition: transform 0.5s var(--ease-spring); }
.os-refer__icon svg { width: 16px; height: 16px; }
.os-refer:hover .os-refer__icon { transform: rotate(-12deg) scale(1.06); }
@media (max-width: 520px) { .os-refer { width: 100%; } .os-refer__label { flex: 1; } .os-dash-hero__actions .os-btn { width: 100%; justify-content: space-between; } }
@media (min-width: 960px) {
  .os-dash-hero { padding: 34px; min-height: 380px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr auto; column-gap: 32px; }
  .os-dash-hero__top { grid-column: 1 / -1; }
  .os-dash-hero__id { grid-column: 1; grid-row: 2; align-self: start; }
  .os-dash-hero__metric { grid-column: 1; grid-row: 3; }
  .os-dash-hero__actions { grid-column: 2; grid-row: 3; flex-direction: column; align-items: stretch; align-self: end; }
}

.os-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.os-quick a {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 6px 12px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: transform 0.6s var(--ease-spring), border-color 0.3s ease, color 0.3s ease;
}
.os-quick a span { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); transition: background 0.3s ease, color 0.3s ease, transform 0.6s var(--ease-spring); }
.os-quick a svg { width: 20px; height: 20px; }
.os-quick a:hover { color: var(--text); border-color: var(--line-2); transform: translateY(-3px); }
.os-quick a:hover span { background: var(--accent); color: var(--accent-ink); transform: rotate(-6deg); }
.os-quick a:active { transform: scale(0.95); }
@media (min-width: 720px) { .os-quick a { grid-auto-flow: column; justify-content: start; align-items: center; padding: 14px 16px; font-size: 14px; } }

.os-checklist { display: grid; gap: 16px; }
.os-checklist__head { display: flex; align-items: center; gap: 16px; }
body.os .qe-profile-checklist__title { font-size: 18px; font-weight: 500; letter-spacing: -0.025em; }
.os-checklist__sub { display: block; color: var(--text-3); font-size: 13px; margin-top: 2px; }
.os-ring--lg { width: 64px; height: 64px; }
body.os .qe-profile-checklist__items { display: flex; flex-wrap: wrap; gap: 8px; }
body.os .qe-profile-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  animation: os-row-in 0.6s var(--ease-out) both;
  transition: transform 0.5s var(--ease-spring), border-color 0.3s ease;
}
body.os .qe-profile-check:nth-child(2) { animation-delay: 0.06s; }
body.os .qe-profile-check:nth-child(3) { animation-delay: 0.12s; }
body.os .qe-profile-check:nth-child(4) { animation-delay: 0.18s; }
body.os .qe-profile-check:nth-child(5) { animation-delay: 0.24s; }
body.os .qe-profile-check:hover { transform: translateY(-2px); border-color: var(--accent); }
body.os .qe-profile-check__mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
body.os .qe-profile-check.is-done { color: var(--text-2); }
body.os .qe-profile-check.is-done .qe-profile-check__mark { background: var(--pos); color: var(--ink-0); }
body.os .qe-profile-check.is-todo .qe-profile-check__mark { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
body.os .qe-profile-check.is-todo { border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.os-checklist.is-complete { border-color: color-mix(in srgb, var(--pos) 35%, transparent); }
.os-checklist.is-complete .os-ring circle + circle { stroke: var(--pos); }

.os-dash-pair { display: grid; gap: 14px; }
@media (min-width: 960px) { .os-dash-pair { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.os-flow__body { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.os-flow__body .os-legend { flex: 1; min-width: 180px; }
.os-flow .os-donut { width: 150px; }

.os-journey__path { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.os-journey__node { flex: none; max-width: 38%; }
.os-journey__node small { display: block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.os-journey__node b { display: block; margin-top: 6px; font-size: clamp(20px, 5vw, 26px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; overflow-wrap: anywhere; }
.os-journey__node--next { text-align: right; }
.os-journey__line { position: relative; flex: 1; height: 4px; border-radius: 4px; background: var(--surface-3); }
.os-journey__line i { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--pos), var(--accent)); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 1.4s var(--ease-out); }
.os-journey__line em {
  position: absolute;
  top: 50%;
  left: calc(var(--p, 0) * 100%);
  width: 30px; height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line-2);
  color: var(--warn);
  transition: left 1.4s var(--ease-out);
  box-shadow: 0 0 0 5px var(--surface);
}
.os-journey__line em svg { width: 15px; height: 15px; }
.os-reqs { list-style: none; margin: 0; padding: 0; display: grid; }
.os-reqs li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }
.os-reqs li span { flex: 1; min-width: 0; }
.os-reqs li b { font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.os-reqs li i { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; transition: background 0.4s ease, border-color 0.4s ease; }
.os-reqs li.is-open i { border-color: var(--warn); border-style: dashed; animation: os-spin 12s linear infinite; }
.os-reqs li.is-met i { background: var(--pos); border-color: var(--pos); }
.os-reqs li.is-met i::after { content: ""; width: 9px; height: 5px; border: solid var(--ink-0); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.os-reqs li.is-met span { color: var(--text); }
.os-journey .goals:empty { display: none; }

.os-dash-perf { display: grid; gap: 14px; }
@media (min-width: 960px) { .os-dash-perf { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: stretch; } }

.os-news .splide__slide a { display: block; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.os-news .blog-card { margin: 0; padding: 0; background: none; box-shadow: none; }
.os-news .blog-card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; transition: transform 1.2s var(--ease-out), filter 0.6s ease; filter: saturate(0.9); }
.os-news .splide__slide a:hover img { transform: scale(1.05); filter: saturate(1.1); }
.os-news .splide__pagination { position: static; transform: none; flex-wrap: wrap; justify-content: center; margin-top: 14px; padding: 0 12px; gap: 6px; }
.os-news .splide__pagination__page { width: 6px; height: 6px; margin: 0; border-radius: 6px; background: var(--line-2); opacity: 1; transition: width 0.5s var(--ease-out), background 0.3s ease; transform: none; }
.os-news .splide__pagination__page.is-active { width: 22px; background: var(--accent); transform: none; }
.os-news .splide__arrow { display: none; }

.os-help { display: flex; align-items: center; gap: 18px; padding: 22px; color: var(--text); transition: transform 0.6s var(--ease-out); }
.os-help:hover { transform: translateY(-3px); }
.os-help__icon { flex: none; width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: var(--surface-3); color: var(--accent); }
.os-help__icon svg { width: 24px; height: 24px; }
.os-help__body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.os-help__body b { display: flex; align-items: center; gap: 6px; font-size: clamp(20px, 5vw, 26px); font-weight: 500; letter-spacing: -0.035em; }
.os-help__body small { color: var(--text-2); font-size: 13px; }
.os-help__go { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--btn-bg); color: var(--btn-fg); transition: transform 0.6s var(--ease-spring); }
.os-help__go svg { width: 18px; height: 18px; }
.os-help:hover .os-help__go { transform: rotate(45deg); }

/* ═════════════════════════ LISTS, INVESTED, REPORTS, SOON ═════════════════════════ */
.os-team-total { margin-bottom: 14px; }
.os-team-total .item { display: flex; flex-direction: column; gap: 26px; min-height: 200px; padding: 24px; border-radius: 28px; color: var(--text); }
.os-team-total__field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.8; -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); }
.os-team-total .detail strong { font-family: var(--font-mono); font-size: 10.5px; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); }
.os-team-total .right { margin-top: auto; }
.os-team-total .price span { float: none !important; display: block; font-size: clamp(44px, 12vw, 84px); font-weight: 500; letter-spacing: -0.05em; line-height: 0.95; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.os-insight--flat { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.os-ledger--invest > .item { padding: 18px; }
.os-ledger--invest .item .right { gap: 6px; }
.os-ledger--invest .item .price { font-size: 14px; }
.os-ledger--invest .source-of-funds-wrap .form-select { height: 44px; font-size: 13.5px; }
.os-ledger--invest .item .detail p.small { color: var(--text-2); font-family: var(--font-ui); letter-spacing: 0; }
.os-ledger--invest .item .detail p.small strong { display: inline; font-size: inherit; color: var(--text); }

.os-terms h6 { margin: 18px 0 6px; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.os-terms p { margin-bottom: 10px; font-size: 13.5px; line-height: 1.6; }
.os-agree {
  position: sticky;
  bottom: -16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 18px -22px -16px;
  padding: 16px 22px;
  background: var(--surface-2);
  border-top: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
  cursor: pointer;
}
.os-agree input { flex: none; margin: 1px 0 0 !important; }
.os-agree:has(:checked) { background: color-mix(in srgb, var(--pos) 10%, var(--surface-2)); }

/* coming soon */
.os-soon { min-height: min(72dvh, 620px); padding: 32px 24px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 30px; }
.os-soon__field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.9; }
.os-soon .os-title { margin-top: 16px; font-size: clamp(56px, 14vw, 132px); }
.os-soon .os-lead { max-width: 46ch; color: var(--text-2); }
.os-soon__orbit { position: absolute; top: 28px; right: 24px; width: min(46vw, 260px); aspect-ratio: 1; }
.os-soon__orbit i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-2); animation: os-spin 24s linear infinite; }
.os-soon__orbit i::after { content: ""; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.os-soon__orbit i:nth-child(2) { inset: 18%; animation-duration: 16s; animation-direction: reverse; }
.os-soon__orbit i:nth-child(2)::after { background: var(--ember); box-shadow: 0 0 14px var(--ember); }
.os-soon__orbit i:nth-child(3) { inset: 36%; animation-duration: 10s; border-style: dashed; }
.os-soon__orbit b { position: absolute; inset: 42%; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--accent); }
.os-soon__orbit b svg { width: 60%; height: 60%; }
@media (min-width: 960px) { .os-soon { padding: 48px; } .os-soon__orbit { top: 48px; right: 48px; width: 320px; } }

/* reports (form stays #reportFilterForm; tabs/rows rendered by app.js) */
body.os .qe-report-filters { margin-bottom: 16px; }
body.os .qe-report-filters__hint { margin: 0 0 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--text-3); }
body.os .qe-report-filters__row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: end; }
body.os .qe-report-filters__go { grid-column: 1 / -1; }
@media (min-width: 720px) { body.os .qe-report-filters__row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) minmax(180px, 0.8fr); } body.os .qe-report-filters__go { grid-column: auto; } }
.os-date label { display: block; margin-bottom: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.os-date .form-control { height: 50px; }
.os-date__arrow { width: 28px; height: 50px; display: grid; place-items: center; color: var(--text-3); }
.os-date__arrow svg { width: 14px; height: 14px; transform: rotate(45deg); }
body.os .qe-report-tabs:empty { display: none; }
body.os .qe-report-tabs { margin-bottom: 14px; }
body.os .qe-report-tab {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font: 500 13px/1 var(--font-ui);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease;
}
body.os .qe-report-tab:hover { color: var(--text); }
body.os .qe-report-tab.qe-report-tab--active { background: var(--text); color: var(--bg); }
.os-reports:empty { display: none; }
.os-reports { display: grid; gap: 12px; animation: os-row-in 0.6s var(--ease-out) both; }
body.os .qe-report-meta { font-size: 13px; color: var(--text-2); }
body.os .qe-report-meta strong { color: var(--text); font-weight: 500; }
body.os .qe-report-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
body.os .qe-report-sum { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 18px 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
body.os .qe-report-sum > span, body.os .qe-report-sum__item span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
body.os .qe-report-sum strong { font-size: clamp(22px, 5.4vw, 30px); font-weight: 500; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
body.os .qe-report-sum--cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.os .qe-report-sum__item { display: grid; gap: 6px; min-width: 0; }
body.os .qe-report-sum__item strong { font-size: clamp(16px, 4.2vw, 24px); overflow-wrap: anywhere; }
body.os .qe-report-section { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
body.os .qe-report-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14px; animation: os-row-in 0.6s var(--ease-out) both; }
body.os .qe-report-row:last-child { border-bottom: 0; }
body.os .qe-report-row strong { font-weight: 500; }
body.os .qe-report-sub { display: inline-block; margin-top: 3px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); line-height: 1.5; }
body.os .qe-report-amt { flex: none; font-weight: 500; font-variant-numeric: tabular-nums; }
body.os .qe-report-mono { font-family: var(--font-mono); font-size: 10.5px; word-break: break-all; }
body.os .qe-report-empty, body.os .qe-report-loading { margin: 0; padding: 40px 20px; text-align: center; color: var(--text-3); }
body.os .qe-report-loading::before { content: ""; display: block; width: 28px; height: 28px; margin: 0 auto 12px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: os-spin 0.8s linear infinite; }
body.os .qe-report-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
body.os .qe-report-pager__info { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }

/* ═════════════════════════ PLANS, FUNDING ═════════════════════════ */
.os-top__cta { min-height: 38px; padding: 0 14px; gap: 6px; font-size: 13px; }
.os-top__cta svg { width: 15px; height: 15px; }

.os-tiers { display: grid; gap: 14px; }
@media (min-width: 720px) { .os-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1240px) { .os-tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.os-tier {
  --tier: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border-radius: 28px;
  background: radial-gradient(90% 60% at 100% 0%, color-mix(in srgb, var(--tier) 16%, transparent), transparent 70%), var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.7s var(--ease-out), border-color 0.4s ease;
}
@media (hover: hover) { .os-tier:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--tier) 45%, transparent); } }
.os-tier__field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.55; -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%); }
.os-tier__head { display: flex; align-items: center; gap: 12px; }
.os-tier__no { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--tier) 50%, transparent); color: var(--tier); font: 500 11px/1 var(--font-mono); }
.os-tier__name { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-2); }
.os-tier__pts { display: flex; align-items: baseline; gap: 8px; }
.os-tier__pts b { font-size: clamp(40px, 11vw, 56px); font-weight: 500; letter-spacing: -0.05em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.os-tier__pts span { font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--tier); }
.os-tier__rates { list-style: none; margin: 0; padding: 0; display: grid; }
.os-tier__rates li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }
.os-tier__rates li b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.os-tier__meta { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.os-tier .os-btn { margin-top: auto; }
.os-tier--elite { background: radial-gradient(90% 60% at 100% 0%, color-mix(in srgb, var(--tier) 22%, transparent), transparent 70%), var(--ink-1); color: var(--bone); --text: var(--bone); --text-2: rgba(237, 234, 226, 0.66); --text-3: rgba(237, 234, 226, 0.42); --line: rgba(237, 234, 226, 0.1); --btn-bg: var(--bone); --btn-fg: var(--ink-0); --surface-3: rgba(237, 234, 226, 0.1); }

/* step schedule chart (qe-os.js draws rect/path/text) */
.os-sch { display: block; width: 100%; height: 96px; overflow: visible; }
.os-sch .os-sch__bar { fill: color-mix(in srgb, var(--tier, var(--accent)) 18%, transparent); transform-box: fill-box; transform-origin: bottom; animation: os-grow 1s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 110ms + 150ms); }
.os-sch .os-sch__line { fill: none; stroke: var(--tier, var(--accent)); stroke-width: 1.8; stroke-linejoin: round; }
.os-sch .os-sch__v { fill: var(--text); font: 500 10px var(--font-mono); text-anchor: middle; }
.os-sch .os-sch__m { fill: var(--text-3); font: 400 9px var(--font-mono); }
@keyframes os-grow { from { transform: scaleY(0); } }

/* plan modal */
.os-plan-title #pkgname { font-size: 24px; letter-spacing: -0.035em; }
.os-plan-title #pkgamount { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 20px; }
body.os .qe-plan-balance-value { font-weight: 600; font-variant-numeric: tabular-nums; }
body.os .qe-plan-balance-value.is-positive { color: var(--pos); }
body.os .qe-plan-balance-value.is-zero { color: var(--neg); }
body.os .qe-plan-balance-value.is-neutral { color: var(--text-2); }

/* deposit flow */
.os-flowsteps { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: step; }
.os-flowsteps li { position: relative; display: grid; gap: 6px; padding: 16px 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); counter-increment: step; }
.os-flowsteps li::after { content: "0" counter(step); position: absolute; top: 14px; right: 14px; font: 400 10px/1 var(--font-mono); color: var(--text-3); }
.os-flowsteps span { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.os-flowsteps span svg { width: 18px; height: 18px; }
.os-flowsteps b { font-size: 14px; font-weight: 500; }
.os-flowsteps small { font-size: 12px; color: var(--text-3); line-height: 1.4; }
@media (max-width: 520px) { .os-flowsteps small { display: none; } }
.os-bankcard { position: relative; padding: 18px 18px 6px; margin-bottom: 22px; border-radius: 22px; background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%), var(--ink-1); color: var(--bone); --text: var(--bone); --text-2: rgba(237, 234, 226, 0.62); --text-3: rgba(237, 234, 226, 0.42); --line: rgba(237, 234, 226, 0.1); overflow: hidden; }
.os-bankcard__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; color: var(--signal); }
.os-bankcard__top svg { width: 22px; height: 22px; }
.os-bankcard .os-kv { list-style: none; margin: 0; padding: 0; }
.os-bankcard .os-kv li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.os-bankcard .os-kv li:last-child { border-bottom: 0; }
.os-bankcard .os-kv li span { color: var(--text-2); }
.os-bankcard .os-kv strong { font-weight: 500; text-align: right; overflow-wrap: anywhere; }
[data-os-copy] { cursor: pointer; position: relative; padding-right: 22px; }
[data-os-copy]::after { content: ""; position: absolute; right: 0; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: currentColor; opacity: 0.45; -webkit-mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3e%3crect x='8.5' y='8.5' width='11' height='11' rx='2'/%3e%3cpath d='M15.5 8.5V6A1.5 1.5 0 0 0 14 4.5H6A1.5 1.5 0 0 0 4.5 6v8A1.5 1.5 0 0 0 6 15.5h2.5'/%3e%3c/svg%3e") center / contain no-repeat; mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3e%3crect x='8.5' y='8.5' width='11' height='11' rx='2'/%3e%3cpath d='M15.5 8.5V6A1.5 1.5 0 0 0 14 4.5H6A1.5 1.5 0 0 0 4.5 6v8A1.5 1.5 0 0 0 6 15.5h2.5'/%3e%3c/svg%3e") center / contain no-repeat; transition: opacity 0.3s ease; }
[data-os-copy]:hover::after { opacity: 1; }
[data-os-copy].is-copied { color: var(--pos) !important; }
[data-os-copy].is-copied::after { opacity: 1; -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M5 12.5l4.5 4.5L19 7.5'/%3e%3c/svg%3e"); mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M5 12.5l4.5 4.5L19 7.5'/%3e%3c/svg%3e"); }
.os-sheet-step { display: flex; margin: 0 0 14px; color: var(--text-3); }
body.os .custom-file-upload.os-drop label { background-size: cover; background-position: center; }
body.os .custom-file-upload.os-drop label.file-uploaded span { padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--ink-0) 70%, transparent); color: var(--bone); font-size: 12.5px; }
body.os .action-sheet .row { margin: 0; }
body.os .action-sheet .row > * { padding: 0; }

/* coupon ticket */
.os-ticket { position: relative; height: 92px; margin-bottom: 20px; border-radius: 20px; background: linear-gradient(120deg, color-mix(in srgb, var(--ember) 28%, var(--surface-2)), color-mix(in srgb, var(--accent) 22%, var(--surface-2))); display: grid; place-items: center; overflow: hidden; }
.os-ticket span { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); color: var(--ember); animation: os-float 5s var(--ease-io) infinite alternate; }
.os-ticket span svg { width: 26px; height: 26px; }
.os-ticket::before, .os-ticket::after { content: ""; position: absolute; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--surface); }
.os-ticket::before { left: -11px; }
.os-ticket::after { right: -11px; }
.os-ticket i { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%) -100% 0 / 60% 100% no-repeat; animation: os-sheen 3.2s ease-in-out infinite; }
@keyframes os-sheen { to { background-position: 250% 0; } }
body.os .os-code-input { font-family: var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; }
body.os .os-code-input::placeholder { text-transform: none; letter-spacing: 0; font-family: var(--font-ui); }

/* withdraw sheet */
.os-label { display: block; margin-bottom: 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
body.os .os-choice.form-check { display: grid; gap: 4px; padding: 16px 18px; min-height: 0; }
body.os .os-choice.form-check-inline { margin: 0; }
body.os .os-choice .form-check-label.text-info, body.os .os-choice .form-check-label.text-primary { color: var(--text) !important; }
.os-withdraw-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; padding: 16px 18px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.os-withdraw-total span { font-size: 13px; color: var(--text-2); }
.os-withdraw-total strong { font-size: 26px; font-weight: 500; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }

/* table status cells (app.js puts text-* on the last td) */
body.os .table td.text-end:is(.text-success, .text-warning, .text-danger)::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; vertical-align: 1px; }
body.os .table td.text-end { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; white-space: nowrap; }
@media (max-width: 420px) { body.os .table td.text-end { font-size: 10.5px; letter-spacing: 0.04em; } }
body.os .table td.text-end.text-primary { font-family: var(--font-ui); font-size: 14px; letter-spacing: 0; font-weight: 500; }

/* ═════════════════════════ SETTINGS, SUPPORT ═════════════════════════ */
.os-profile { position: relative; display: flex; align-items: center; gap: 18px; padding: 22px; margin-bottom: 30px; border-radius: 28px; overflow: hidden; isolation: isolate; }
.os-profile__field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.7; }
.os-profile__who { display: grid; gap: 4px; min-width: 0; }
.os-profile__who b { font-size: clamp(22px, 6vw, 30px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; overflow-wrap: anywhere; }
.os-profile__who small { color: var(--text-3); font-size: 12.5px; }
body.os .avatar-section { position: relative; flex: none; }
body.os .avatar-section a { position: relative; display: block; width: 76px; height: 76px; padding: 3px; isolation: isolate; }
body.os .avatar-section a::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: conic-gradient(from 200deg, var(--signal), var(--ember), transparent 70%, var(--signal)); animation: os-spin 9s linear infinite; }
body.os .avatar-section img { display: block; width: 100% !important; height: 100%; border-radius: 50% !important; object-fit: cover; background: var(--ink-2); border: 3px solid var(--ink-1); }
body.os .avatar-section .button { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bone); color: var(--ink-0); border: 2px solid var(--ink-1); font-size: 14px; transition: transform 0.4s var(--ease-out); }
@media (hover: hover) { body.os .avatar-section a:hover .button { transform: scale(1.12); } }
@keyframes os-spin { to { transform: rotate(360deg); } }

body.os #bankedit.os-bankedit { float: none !important; display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); color: var(--accent); font: 500 11px/1 var(--font-mono); letter-spacing: 0.14em; cursor: pointer; box-shadow: none; transition: background 0.3s ease, color 0.3s ease, transform 0.4s var(--ease-out); }
@media (hover: hover) { body.os #bankedit.os-bankedit:hover { background: var(--accent); color: var(--accent-ink); transform: translateY(-1px); } }
body.os #bankedit.os-bankedit.disabled { opacity: 0.45; pointer-events: none; }
.os-bankview { position: relative; padding: 20px 22px; overflow: hidden; }
.os-bankview__chip { position: absolute; top: 20px; right: 22px; width: 38px; height: 28px; border-radius: 7px; background: linear-gradient(135deg, color-mix(in srgb, var(--ember) 70%, transparent), color-mix(in srgb, var(--ember) 30%, transparent)); opacity: 0.8; }
.os-bankview__chip::before { content: ""; position: absolute; inset: 8px 0; border-top: 1px solid rgba(0, 0, 0, 0.18); border-bottom: 1px solid rgba(0, 0, 0, 0.18); }
.os-bankview__grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .os-bankview__grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.os-bankview h5 { margin: 0 0 4px; font-family: var(--font-mono); font-size: 10px; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.os-bankview p { margin: 0; min-height: 1.4em; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.os-bankview p:empty::before { content: "Not added yet"; color: var(--text-3); font-weight: 400; font-size: 14px; font-family: var(--font-ui); }

.os-settings-cols { display: grid; gap: 0 18px; }
@media (min-width: 960px) { .os-settings-cols { grid-template-columns: 1fr 1fr; align-items: start; } }
.os-list > .os-setrow { cursor: default; }
@media (hover: hover) { .os-list > .os-setrow:hover { padding-left: 4px; } }
.os-list > .item.disabled { cursor: default; }
@media (hover: hover) { .os-list > .item.disabled:hover { padding-left: 4px; } .os-list > .item.disabled:hover .os-list__end svg { transform: none; } }
.os-list > .item.disabled .os-list__end svg { opacity: 0; }
.os-list > .os-setrow--danger .os-list__icon { color: var(--neg); background: color-mix(in srgb, var(--neg) 8%, transparent); border-color: color-mix(in srgb, var(--neg) 22%, transparent); }
.os-list__body small.text-success { font-size: 12px; }
.os-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 11px; border-radius: 999px; background: color-mix(in srgb, currentColor 11%, transparent); border: 1px solid color-mix(in srgb, currentColor 24%, transparent); font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; white-space: nowrap; }
.os-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.os-pill.text-danger::before { animation: os-blinkdot 1.8s ease-in-out infinite; }
@keyframes os-blinkdot { 50% { opacity: 0.25; } }

.os-modal-actions--stack > * { flex: none; }
.os-resend--modal { margin: 14px 0 0; }
.os-warnnote { margin-top: 10px !important; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 9%, transparent); font-weight: 500; font-size: 12.5px; line-height: 1.45; }
.os-block-note { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.45; }
body.os .form-group.basic .label:has(.os-req-note) { flex-wrap: wrap; row-gap: 4px; }
.os-req-note { flex-basis: 100%; color: var(--neg); font: 400 12px/1.4 var(--font-ui); text-transform: none; letter-spacing: 0; }
body.os .modal-title.os-title-warn { font-size: 17px; line-height: 1.3; color: var(--neg); }
body.os #bankSubmitBtn .spinner-border { width: 15px; height: 15px; border-width: 2px; }
body.os #bankSubmitBtn[aria-busy="true"] .os-btn__icon { display: none; }

/* support (support.html inline script renders sup-*; status keys: waiting_admin, waiting_user, resolved, closed) */
.sup-wrap { --sup-waiting_admin: var(--warn); --sup-waiting_user: var(--accent); --sup-resolved: var(--pos); --sup-closed: var(--text-3); }
.os-sup-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.os-phero .os-sup-legend { --sup-waiting_admin: var(--warn); --sup-waiting_user: var(--accent); --sup-resolved: var(--pos); --sup-closed: var(--text-3); }
.sup-status { --c: var(--text-3); display: inline-flex; align-items: center; gap: 6px; min-height: 22px; padding: 0 9px; border-radius: 999px; background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); color: var(--c); font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.06em; white-space: nowrap; vertical-align: 1px; }
.sup-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sup-status--waiting_admin { --c: var(--sup-waiting_admin); }
.sup-status--waiting_user { --c: var(--sup-waiting_user); }
.sup-status--waiting_user::before { animation: os-blinkdot 1.6s ease-in-out infinite; }
.sup-status--resolved { --c: var(--sup-resolved); }
.sup-status--closed { --c: var(--sup-closed); }
body.os .os-sup-new { margin-bottom: 18px; }
@media (min-width: 720px) { body.os .os-sup-new { width: auto; min-width: 220px; } }
.os-sup-list { display: grid; gap: 10px; }
@media (min-width: 960px) { .os-sup-list { grid-template-columns: 1fr 1fr; } }
.os-sup-list > .sup-meta { padding: 34px 18px; border-radius: 22px; border: 1px dashed var(--line-2); text-align: center; color: var(--text-3); }
.sup-card { --c: var(--text-3); position: relative; display: grid; gap: 8px; width: 100%; padding: 16px 18px 16px 22px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 7%, transparent), transparent 55%), var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; overflow: hidden; transition: transform 0.5s var(--ease-out), border-color 0.3s ease, box-shadow 0.4s ease; animation: os-rise 0.6s var(--ease-out) both; }
.sup-card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.sup-card:nth-child(2) { animation-delay: 40ms; } .sup-card:nth-child(3) { animation-delay: 80ms; } .sup-card:nth-child(4) { animation-delay: 120ms; } .sup-card:nth-child(n+5) { animation-delay: 160ms; }
@media (hover: hover) { .sup-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 40%, transparent); box-shadow: var(--shadow); } }
.sup-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sup-card strong { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.sup-card--waiting_admin { --c: var(--sup-waiting_admin); }
.sup-card--waiting_user { --c: var(--sup-waiting_user); }
.sup-card--resolved { --c: var(--sup-resolved); }
.sup-card--closed { --c: var(--sup-closed); }
.sup-card--closed strong { color: var(--text-2); }
.sup-meta { font-family: var(--font-mono); font-size: 10.5px; line-height: 2; letter-spacing: 0.08em; color: var(--text-3); text-transform: uppercase; }
.sup-meta .sup-status { text-transform: none; }
@keyframes os-rise { from { opacity: 0; transform: translateY(8px); } }
body.os .os-sup-pager { align-items: center; margin-top: 18px !important; }

.os-sup-create { display: grid; gap: 6px; padding: 22px; max-width: 680px; }
.os-sup-create.d-none { display: none !important; }
.os-sup-create .os-eyebrow { margin-bottom: 8px; }
.os-sup-field label { display: block; margin-bottom: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3) !important; }
body.os .os-sup-field .form-control, body.os .os-sup-field .form-select { margin-bottom: 12px !important; }
body.os .sup-wrap textarea.form-control { min-height: 0; height: auto; padding-top: 12px; padding-bottom: 12px; line-height: 1.5; resize: vertical; }

.os-sup-thread { max-width: 820px; }
.os-sup-back { border: 0; background: none; padding: 0; margin-bottom: 18px; font: inherit; cursor: pointer; }
.os-sup-thread__head { padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.os-sup-thread__head h5 { margin: 0 0 6px; font-size: clamp(20px, 5vw, 26px); font-weight: 500; letter-spacing: -0.03em; }
.os-sup-messages { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.sup-msg { position: relative; max-width: min(88%, 560px); padding: 12px 15px 10px; border-radius: 20px; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; animation: os-rise 0.5s var(--ease-out) both; }
.sup-msg--user { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--accent); color: var(--accent-ink); }
.sup-msg--admin { align-self: flex-start; border-bottom-left-radius: 6px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.sup-who { margin-bottom: 3px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.7; }
.sup-msg--admin .sup-who { color: var(--pos); opacity: 1; }
.sup-msg .sup-meta { margin-top: 4px; font-size: 10.5px; color: inherit; opacity: 0.6; text-transform: none; }
.os-sup-reply { padding: 14px; box-shadow: var(--shadow); transition: border-color 0.3s ease; }
.os-sup-reply:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
body.os .os-sup-reply textarea.form-control { border: 0; background: transparent; box-shadow: none; padding-left: 4px; padding-right: 4px; }
.os-sup-reply__actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.os-sup-reply[style*="none"] { display: none !important; }

/* ═════════════════════════ ADMIN ═════════════════════════ */
.os-btn--pos { --b-bg: var(--pos); --b-fg: #fff; --b-fill: color-mix(in srgb, #000 18%, var(--pos)); }
@media (hover: hover) { .os-btn--pos:hover { color: #fff; } }
.os-dark .os-btn--pos { --b-fg: var(--ink-0); }
@media (hover: hover) { .os-dark .os-btn--pos:hover { color: var(--ink-0); } }
.os-admin-hero .os-avatar img { width: 100% !important; height: 100%; border-radius: 50%; object-fit: cover; }

.os-console { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.os-console__tile { --tone: var(--accent); position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; row-gap: 2px; align-items: center; padding: 18px 54px 18px 18px; border-radius: 22px; background: radial-gradient(80% 90% at 0% 0%, color-mix(in srgb, var(--tone) 12%, transparent), transparent 70%), var(--surface); border: 1px solid var(--line); color: var(--text); overflow: hidden; transition: transform 0.6s var(--ease-out), border-color 0.4s ease, box-shadow 0.4s ease; }
.os-console__icon { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--tone) 14%, transparent); color: var(--tone); border: 1px solid color-mix(in srgb, var(--tone) 26%, transparent); }
.os-console__icon svg { width: 20px; height: 20px; }
.os-console__tile b { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 500; letter-spacing: -0.01em; }
.os-console__tile small { color: var(--text-3); font-size: 12.5px; line-height: 1.4; }
.os-console__go { position: absolute; right: 16px; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); border: 1px solid var(--line); transition: transform 0.5s var(--ease-out), background 0.3s ease, color 0.3s ease; }
.os-console__go svg { width: 14px; height: 14px; }
@media (hover: hover) {
  .os-console__tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--tone) 40%, transparent); box-shadow: var(--shadow); }
  .os-console__tile:hover .os-console__go { background: var(--tone); color: var(--ink-0); border-color: transparent; transform: rotate(45deg); }
}

/* queue summary (qe-os.js counts the rows app.js renders) */
.os-qsum { padding: 18px; margin-bottom: 26px; }
.os-qsum__cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .os-qsum__cells { grid-template-columns: repeat(3, minmax(0, 1fr)) 1.6fr; } }
.os-qsum__cell { --tone: var(--text-3); display: grid; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.os-qsum__cell span { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.os-qsum__cell span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 10px var(--tone); }
.os-qsum__cell b { font-size: 26px; font-weight: 500; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.os-qsum__cell--total { grid-column: 1 / -1; --tone: var(--warn); }
@media (min-width: 720px) { .os-qsum__cell--total { grid-column: auto; } }
.os-qbar { display: flex; height: 8px; margin-top: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.os-qbar i { display: block; height: 100%; width: 0; transition: width 1.1s var(--ease-out); }
.os-qbar [data-os-qbar="pending"] { background: var(--warn); }
.os-qbar [data-os-qbar="approved"] { background: var(--pos); }
.os-qbar [data-os-qbar="rejected"] { background: var(--neg); }

/* review queue (admin app.js: li > a.item.depo|withd|close-req > .icon-box + .in > div + .badge) */
body.os .os-queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; background: none; border: 0; }
@media (min-width: 960px) { body.os .os-queue { grid-template-columns: 1fr 1fr; } }
body.os .os-queue::before, body.os .os-queue::after, body.os .os-queue > li::after { display: none; }
body.os .os-queue > li { margin: 0; padding: 0; border: 0; animation: os-rise 0.6s var(--ease-out) both; }
body.os .os-queue > li:nth-child(2) { animation-delay: 40ms; } body.os .os-queue > li:nth-child(3) { animation-delay: 80ms; } body.os .os-queue > li:nth-child(n+4) { animation-delay: 120ms; }
body.os .os-queue > li > .item { position: relative; display: flex; align-items: flex-start; gap: 14px; min-height: 0; padding: 16px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: transform 0.5s var(--ease-out), border-color 0.3s ease, box-shadow 0.4s ease; }
body.os .os-queue > li > .item:has(.icon-box.bg-warning) { cursor: pointer; border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); background: linear-gradient(90deg, color-mix(in srgb, var(--warn) 7%, transparent), transparent 60%), var(--surface); }
@media (hover: hover) { body.os .os-queue > li > .item:has(.icon-box.bg-warning):hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--warn) 55%, transparent); } }
body.os .os-queue .icon-box { flex: none; width: 40px; height: 40px; margin: 0; border-radius: 13px; display: grid; place-items: center; font-size: 18px; color: var(--c, var(--text-3)); background: color-mix(in srgb, var(--c, var(--text-3)) 13%, transparent) !important; border: 1px solid color-mix(in srgb, var(--c, var(--text-3)) 28%, transparent); }
body.os .os-queue .icon-box.bg-warning { --c: var(--warn); }
body.os .os-queue .icon-box.bg-success { --c: var(--pos); }
body.os .os-queue .icon-box.bg-danger { --c: var(--neg); }
body.os .os-queue .item:has(.icon-box.bg-warning) .icon-box { animation: os-pulse-ring 2.4s ease-out infinite; }
@keyframes os-pulse-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warn) 40%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }
body.os .os-queue .in { flex: 1; min-width: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 0; }
body.os .os-queue .in::after { display: none; }
body.os .os-queue .in > div { min-width: 0; }
body.os .os-queue .in strong { font-weight: 500; font-size: 15px; }
body.os .os-queue .mb-05 { margin-bottom: 4px; color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; }
body.os .os-queue .mb-05 strong { color: var(--text); }
body.os .os-queue .text-small { font-size: 12.5px; color: var(--text-2); line-height: 1.55; overflow-wrap: anywhere; }
body.os .os-queue .text-small:nth-of-type(n+2) { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.02em; }
body.os .os-queue .text-xsmall { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--text-3); margin-top: 4px; }
body.os .os-queue .badge { flex: none; margin: 0; padding: 7px 11px; border-radius: 999px; font: 500 14px/1 var(--font-ui) !important; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; background: var(--surface-2) !important; color: var(--text) !important; border: 1px solid var(--line-2); }
body.os .os-queue .badge.badge-warning { font: 500 10.5px/1 var(--font-mono) !important; letter-spacing: 0.1em; text-transform: uppercase; color: var(--warn) !important; background: color-mix(in srgb, var(--warn) 12%, transparent) !important; border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
body.os .os-queue .detail strong { color: var(--text-3); font-weight: 400; }
body.os .os-queue > li > .item:not(:has(.icon-box)) { justify-content: center; padding: 34px 18px; border-style: dashed; border-color: var(--line-2); background: none; }
body.os .os-queue > li > .item:not(:has(.icon-box)) .in { justify-content: center; }
@media (max-width: 520px) { body.os .os-queue .in { flex-direction: column; } }
.os-queue__skel { display: grid; gap: 10px; padding: 18px !important; border-radius: 20px; border: 1px solid var(--line) !important; background: var(--surface); }
.os-queue__skel i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)) 0 0 / 200% 100%; animation: os-shimmer-q 1.4s linear infinite; }
.os-queue__skel i:nth-child(1) { width: 45%; height: 16px; } .os-queue__skel i:nth-child(2) { width: 70%; } .os-queue__skel i:nth-child(3) { width: 30%; }
@keyframes os-shimmer-q { to { background-position: -200% 0; } }

.os-review { font-size: 15px; color: var(--text-2); }
.os-review img { display: block; margin-top: 14px; max-height: 52vh; object-fit: contain; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.os-review img[src="#"], .os-review img:not([src]) { display: none; }
.os-review strong { color: var(--text); }
.os-modal-actions--review { flex-wrap: wrap; }
.os-modal-actions--review > :last-child { flex-basis: 100%; }

/* filters, meta, pagers */
.os-filters { padding: 18px; margin-bottom: 14px; display: grid; gap: 14px; }
.os-filters__note { margin: 0 !important; line-height: 1.5; font-size: 13px !important; }
.os-filters__note strong { color: var(--text); }
.os-filters__grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; align-items: end; }
.os-filters__grid--4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 960px) { .os-filters__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.os-filters__wide { grid-column: span 1; }
@media (max-width: 520px) { .os-filters__wide { grid-column: 1 / -1; } }
.os-filters label { display: block; margin-bottom: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3) !important; }
.os-filters__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.os-filters__actions > :first-child, .os-filters__actions > :last-child:nth-child(even) { grid-column: 1 / -1; }
.os-filters__actions > .os-btn--icon { justify-content: space-between; }
@media (min-width: 720px) {
  .os-filters__actions { display: flex; flex-wrap: wrap; }
  .os-filters__actions > :first-child { flex: 1 1 200px; }
  .os-filters__actions > :not(:first-child) { flex: 0 0 auto; min-width: 120px; }
}
body.os .os-filters .form-control, body.os .os-filters .form-select { font-size: 14px; }
.os-meta { margin: 6px 2px 14px !important; padding: 0 !important; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--text-3); text-transform: none; }
.os-pager { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 18px 0 8px; }
.os-pager .small { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; }
body.os .os-pager .os-btn:disabled, body.os .os-sup-pager .os-btn:disabled { opacity: 0.4; pointer-events: none; }

/* pending-by-date payout table (11 columns) */
.pwd-table-wrap.os-table-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
body.os .pwd-table { min-width: 1080px; margin: 0; font-size: 12.5px; }
body.os .pwd-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }
body.os .pwd-table td:nth-child(8) { font-weight: 600; color: var(--text); }
body.os .pwd-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }

/* admin reports user search */
body.os .qe-report-filters--admin { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
body.os .os-date .form-control { min-width: 0; width: 100%; }
@media (min-width: 720px) { body.os .qe-report-filters--admin .qe-report-filters__row:not(.qe-report-filters__row--user) { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); } }
body.os .qe-report-filters--admin .qe-report-filters__hint { margin: 0; }
body.os .qe-report-filters__row--user { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; grid-template-columns: none; }
body.os .qe-report-user-search label { display: block; margin-bottom: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
body.os .qe-report-user-clear { flex: 0 0 auto; }
@media (max-width: 520px) { body.os .qe-report-user-clear { flex: 1 1 100%; } }
body.os #reportUserResults { background: var(--surface) !important; border: 1px solid var(--line-2) !important; border-radius: 16px !important; box-shadow: var(--shadow-lg, var(--shadow)) !important; padding: 6px; margin-top: 6px !important; color: var(--text-3); }
body.os #reportUserResults > div { color: var(--text-3) !important; }
body.os .qe-report-user-hit { display: block; width: 100%; padding: 10px 12px !important; border: 0 !important; border-radius: 10px; background: transparent !important; color: var(--text) !important; text-align: left; font: inherit; font-size: 13.5px !important; cursor: pointer; transition: background 0.2s ease; }
body.os .qe-report-user-hit:hover, body.os .qe-report-user-hit:focus-visible { background: var(--surface-2) !important; }
body.os .qe-report-user-hit span { color: var(--text-3) !important; }
body.os #reportUserSelected { font-family: var(--font-mono); font-size: 11px !important; color: var(--accent) !important; margin-top: 8px !important; }

/* admin support: admin replies sit on the right, member messages on the left */
.sup-wrap--admin .sup-msg--admin { align-self: flex-end; border-bottom-right-radius: 6px; border-bottom-left-radius: 20px; background: var(--accent); color: var(--accent-ink); border: 0; }
.sup-wrap--admin .sup-msg--admin .sup-who { color: inherit; opacity: 0.7; }
.sup-wrap--admin .sup-msg--user { align-self: flex-start; border-bottom-left-radius: 6px; border-bottom-right-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.sup-wrap--admin .sup-msg--user .sup-who { color: var(--warn); opacity: 1; }
.sup-wrap--admin .os-phero { padding-left: 0; padding-right: 0; }
.sup-wrap--admin > #supListView > .sup-meta { padding-left: 2px !important; }
.os-sup-status { padding: 14px; margin-bottom: 12px; }
.os-sup-status label { display: block; margin-bottom: 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
.os-sup-status__row { display: flex; gap: 10px; align-items: stretch; }
.os-sup-status__row .form-select { flex: 1; margin-bottom: 0 !important; }
body.os #supSetStatus { --c: var(--text-3); border-color: color-mix(in srgb, var(--c) 45%, transparent); color: var(--c); background-color: color-mix(in srgb, var(--c) 8%, var(--surface-2)); font-weight: 500; }
body.os #supSetStatus.sup-status--waiting_admin { --c: var(--warn); }
body.os #supSetStatus.sup-status--waiting_user { --c: var(--accent); }
body.os #supSetStatus.sup-status--resolved { --c: var(--pos); }
body.os #supSetStatus.sup-status--closed { --c: var(--text-3); }
body.os #supSetStatus option { color: var(--text); background: var(--surface); }
.os-sup-reply__actions--end { justify-content: flex-end; }

/* ═════════════════════════ INT: DEPOSIT ADDRESS, NEWS, THEME, IDENTITY ═════════════════════════ */
.os-contents { display: contents; }

.qe-skel {
  display: inline-block; vertical-align: middle;
  width: 7em; max-width: 100%; height: 0.9em; border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)) 0 0 / 200% 100%;
  animation: os-shimmer-q 1.3s linear infinite;
}
.qe-skel--sm { width: 4.5em; }
.qe-skel--lg { width: 9em; height: 0.8em; }
.os-card--ink .qe-skel, .os-dash-hero .qe-skel { background-image: linear-gradient(90deg, rgba(237, 234, 226, 0.08), rgba(237, 234, 226, 0.2), rgba(237, 234, 226, 0.08)); }

.os-bnb { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; padding: 20px; cursor: pointer; transition: border-color 0.3s ease, transform 0.6s var(--ease-out); }
.os-bnb:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.os-bnb:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.os-bnb__qr {
  position: relative; width: 144px; aspect-ratio: 1; padding: 12px; border-radius: 20px; overflow: hidden;
  background: #fff; box-shadow: 0 0 0 1px var(--line-2), 0 18px 40px -22px color-mix(in srgb, var(--accent) 70%, transparent);
}
.os-bnb__qr #bnbQR { width: 120px; height: 120px; }
.os-bnb__qr #bnbQR img, .os-bnb__qr #bnbQR canvas { width: 120px; height: 120px; image-rendering: pixelated; }
.os-bnb__qr #bnbQR:empty {
  border-radius: 8px; opacity: 0.18;
  background:
    linear-gradient(#000 0 0) 0 0 / 34px 34px no-repeat, linear-gradient(#000 0 0) 100% 0 / 34px 34px no-repeat, linear-gradient(#000 0 0) 0 100% / 34px 34px no-repeat,
    repeating-conic-gradient(#000 0 25%, transparent 0 50%) 0 0 / 12px 12px;
}
.os-bnb__scan {
  position: absolute; left: 10px; right: 10px; top: 12px; height: 2px; border-radius: 2px;
  background: var(--signal-2); box-shadow: 0 0 12px 2px color-mix(in srgb, var(--signal-2) 60%, transparent);
  animation: os-scan 2.6s var(--ease-io) infinite alternate;
}
@keyframes os-scan { to { transform: translateY(118px); } }
.os-bnb__body { display: grid; gap: 10px; min-width: 0; }
.os-bnb__title { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -0.02em; color: var(--text); }
.os-bnb__addr { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; word-break: break-all; color: var(--text); }
.os-bnb__addr:empty::before { content: "Your deposit address appears here once assigned."; font-family: var(--font-ui); color: var(--text-3); }
.os-bnb__actions { display: flex; gap: 8px; }
.os-bnb__actions .os-btn svg { width: 16px; height: 16px; }
.os-bnb__rate { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); font-size: 13px; color: var(--text-2); }
.os-bnb__rate b { color: var(--accent); font-weight: 500; text-align: right; }
.os-bnb__note { margin: 0; font-size: 12px; line-height: 1.45; color: var(--text-3); }
.os-bnb__note--warn { color: var(--warn); }
@media (max-width: 479px) {
  .os-bnb { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .os-bnb__body { justify-items: stretch; width: 100%; }
  .os-bnb__actions { justify-content: center; }
}

.os-news__head { flex-wrap: wrap; align-items: flex-end; row-gap: 10px; }
.os-news__head h2 { margin-bottom: 4px; }
.os-news__toolbar { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.os-news__status { margin: 0; max-width: 34ch; font-size: 11px; line-height: 1.4; color: var(--text-3); text-align: right; }
.os-news__refresh { width: 38px; height: 38px; }
.os-news__refresh svg { width: 18px; height: 18px; }
.os-news__refresh:disabled { cursor: progress; opacity: 0.75; }
.os-news__refresh:disabled svg { animation: os-spin 0.9s linear infinite; }
.os-news .splide__slide a { height: 100%; transition: border-color 0.3s ease, transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out); }
.os-news .splide__slide a:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.45); }
.os-news .splide__slide a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.os-news .qe-news-card { display: flex; flex-direction: column; height: 100%; }
.os-news .qe-news-card__media { position: relative; flex: none; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.os-news .qe-news-card__media img { height: 100%; aspect-ratio: auto; }
.os-news .qe-news-card__source {
  position: absolute; left: 10px; top: 10px; padding: 5px 9px; border-radius: 999px;
  font: 500 9.5px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: #f4f1ea; background: rgba(10, 12, 14, 0.6); border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.os-news .qe-news-card__body { display: grid; align-content: start; gap: 7px; padding: 14px 16px 16px; }
.os-news .qe-news-card__time { font: 10.5px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.os-news .qe-news-card__title {
  margin: 0; font-size: 14px; line-height: 1.4; color: var(--text); min-height: 4.2em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  transition: color 0.3s ease;
}
.os-news .qe-news-card > .qe-news-card__title { margin: 14px 16px 16px; }
.os-news .splide__slide a:hover .qe-news-card__title { color: var(--accent); }
.os-news .qe-news-card--placeholder { padding: 26px 20px; border-radius: 22px; border: 1px dashed var(--line-2); background: var(--surface); }
.os-news .qe-news-card--placeholder .qe-news-card__title { margin: 0; min-height: 0; color: var(--text-2); -webkit-line-clamp: 4; }
.os-news .qe-news-card--skel { border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.os-news .qe-news-card--skel .qe-news-card__media { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)) 0 0 / 200% 100%; animation: os-shimmer-q 1.3s linear infinite; }
.os-news .qe-news-card--skel .qe-news-card__title { display: block; min-height: 0; }
.os-news .qe-news-card--skel .qe-skel { display: block; width: 90%; margin-bottom: 8px; }
.os-news .qe-news-card--skel .qe-skel--sm { width: 55%; }
@media (min-width: 992px) {
  .os-news__carousel .splide__arrow {
    display: grid; place-items: center; width: 40px; height: 40px; opacity: 1;
    border-radius: 50%; border: 1px solid var(--line-2); background: var(--glass); backdrop-filter: blur(10px);
    transition: transform 0.4s var(--ease-out), border-color 0.3s ease;
  }
  .os-news__carousel .splide__arrow svg { width: 14px; height: 14px; fill: var(--text); }
  .os-news__carousel .splide__arrow:hover:not(:disabled) { transform: translateY(-50%) scale(1.08); border-color: var(--accent); }
  .os-news__carousel .splide__arrow--prev { left: -8px; }
  .os-news__carousel .splide__arrow--next { right: -8px; }
}

.os-social { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 18px 20px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.os-social__links { display: flex; gap: 8px; }
.os-social__links a {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--text-2);
  transition: transform 0.5s var(--ease-spring), color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.os-social__links a:hover { transform: translateY(-3px); color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.os-social__links svg { width: 18px; height: 18px; }

.os-themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
@media (min-width: 720px) { .os-themes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
body.os .os-theme.form-check { position: relative; margin: 0; padding: 0; min-height: 0; }
body.os .os-theme .form-check-input { position: absolute; bottom: 14px; right: 12px; width: 18px; height: 18px; margin: 0; z-index: 1; border-radius: 50%; cursor: pointer; }
.os-theme .form-check-label {
  position: relative; flex: 1; min-width: 0; display: grid; gap: 3px; height: 100%; padding: 10px 10px 12px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.4s ease, transform 0.5s var(--ease-out);
}
.os-theme:hover .form-check-label { transform: translateY(-2px); border-color: var(--line-2); }
.os-theme .form-check-label b { font-size: 14px; font-weight: 500; margin-top: 6px; }
.os-theme .form-check-label small { font-size: 11.5px; color: var(--text-3); }
.os-theme .form-check-input:checked + .form-check-label { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); }
.os-theme .form-check-input:focus-visible + .form-check-label { outline: 2px solid var(--accent); outline-offset: 2px; }
.os-theme__art { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-2); }
.os-theme__art::before, .os-theme__art::after { content: ""; position: absolute; left: 12%; height: 12%; border-radius: 4px; }
.os-theme__art::before { top: 22%; width: 46%; background: currentColor; opacity: 0.55; }
.os-theme__art::after { top: 46%; width: 70%; background: currentColor; opacity: 0.22; }
.os-theme__art--light { background: linear-gradient(160deg, #fbfaf6, #e9e5dc); color: #0b0d11; }
.os-theme__art--dark { background: linear-gradient(160deg, #191d25, #050608); color: #edeae2; }
.os-theme__art--os { background: linear-gradient(90deg, #f1eee7 50%, #0b0d12 50%); color: #7f8791; }
.os-theme__art--sun { background: radial-gradient(circle at 78% 30%, #ffd79a 0 10%, transparent 11%), linear-gradient(180deg, #8fe3ff 0%, #ffb36b 58%, #11141a 100%); color: #0b0d11; }

.os-kycsteps { list-style: none; display: flex; gap: 8px; margin: 0 0 18px; padding: 0; counter-reset: k; }
.os-kycsteps li { flex: 1; padding-top: 10px; border-top: 2px solid var(--line-2); counter-increment: k; font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); transition: color 0.3s ease, border-color 0.3s ease; }
.os-kycsteps li::before { content: "0" counter(k) " · "; }
.os-kycsteps li.is-on { color: var(--text); border-color: var(--accent); }
.os-kycsteps li.is-done { color: var(--pos); border-color: var(--pos); }
.os-kycstep:not([hidden]) { animation: os-rise 0.5s var(--ease-out) both; }

.os-hintnote { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
p.os-hintnote { margin: 0 0 16px; }

.os-rate-card { display: grid; gap: 6px; margin-top: 14px; padding: 14px 16px; border-radius: 18px; border: 1px dashed var(--line-2); }
.os-rate-card__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; color: var(--text-2); }
.os-rate-card__row strong { color: var(--accent); font-weight: 500; }
.os-rate-card__note { margin: 0; font-size: 12px; line-height: 1.45; color: var(--text-3); }
.os-rate-card__note--warn { color: var(--warn); }

.os-state { display: grid; justify-items: center; gap: 12px; padding: 40px 24px; text-align: center; }
.os-state__art { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--accent); }
.os-state__art svg { width: 26px; height: 26px; }
.os-state__art--busy i { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: os-spin 0.8s linear infinite; }
.os-state--denied .os-state__art { color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.os-state__title { margin: 0; font: 400 clamp(26px, 5vw, 34px)/1.05 var(--font-display); letter-spacing: -0.01em; }
.os-state__lead { margin: 0; max-width: 44ch; color: var(--text-2); font-size: 14.5px; }
.os-state .os-btn { max-width: 320px; margin-top: 6px; }
.os-state:not([hidden]), .os-move:not([hidden]) { animation: os-rise 0.5s var(--ease-out) both; }

.os-move { padding: 22px; }
.os-move__flow { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.os-move__node { display: grid; justify-items: center; gap: 6px; font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.os-move__node svg { width: 52px; height: 52px; padding: 14px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); }
.os-move__node--to svg { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.os-move__line { position: relative; flex: 1; height: 2px; margin-bottom: 18px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.os-move__line i { position: absolute; top: 0; bottom: 0; width: 30%; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--accent)); animation: os-travel 2.2s var(--ease-io) infinite; }
@keyframes os-travel { from { left: -30%; } to { left: 100%; } }
.os-move__lead { margin: 0 0 18px; font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.os-move__lead code { padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--text); font: 12px var(--font-mono); }

body.os .os-passport-cta.btn-success { --b-bg: var(--pos); --b-fg: #fff; }
body.os .os-passport-cta.btn-secondary { --b-bg: var(--surface-3); --b-fg: var(--text-2); }
body.os .os-passport-cta:disabled { opacity: 1; cursor: default; transform: none; }

.os-review__num { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.os-review__num span { font-size: 12px; color: var(--text-3); }
.os-review__num strong:empty::before { content: "—"; }

@media (min-width: 720px) { .os-qsum--3 .os-qsum__cells { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.os-filters__grid--usdt .os-filters__actions > :first-child { grid-column: 1 / -1; }
@media (min-width: 720px) { .os-filters__grid--usdt { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 130px auto; } }
.os-usdt-total { display: flex; align-items: center; gap: 16px; margin: 16px 0; padding: 20px 22px; }
.os-usdt-total__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--mint) 16%, transparent); color: var(--mint); }
.os-usdt-total__icon svg { width: 24px; height: 24px; }
.os-usdt-total > div { display: grid; gap: 4px; }
.os-usdt-total b { font-size: clamp(28px, 6vw, 40px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.os-usdt-table td:nth-child(2) { font: 12px var(--font-mono); color: var(--text-2); }
@media (max-width: 480px) {
  body.os .os-usdt-table :is(th, td) { padding-left: 8px; padding-right: 8px; }
  body.os .os-usdt-table :is(th, td):first-child { padding-left: 14px; }
  body.os .os-usdt-table :is(th, td):last-child { padding-right: 14px; }
  body.os .os-usdt-table td:first-child { font-size: 12px; }
  body.os .os-usdt-table td:nth-child(2) { font-size: 10.5px; letter-spacing: -0.02em; }
  body.os .os-usdt-table td.text-end { font-size: 12px; }
}

.qe-settings-bnb-preview { padding: 3px 8px; border-radius: 8px; font-size: 11.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); }
@media (max-width: 420px) { .qe-settings-bnb-preview { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .os-bnb__scan, .os-move__line i { animation: none; }
  .os-news .splide__slide a, .os-news .splide__slide a:hover { transform: none; }
}

/* ═════════════════════════ AUTH ═════════════════════════ */
body.os-authpage { min-height: 100dvh; background: var(--ink-0); color: var(--bone); }
.os-auth {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
}
.os-stage {
  position: relative;
  min-height: 42dvh;
  padding: calc(20px + env(safe-area-inset-top)) var(--gut) 64px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink-0);
  color: var(--bone);
}
.os-stage__media {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 45%, #000 45%, transparent 85%);
  mask-image: radial-gradient(120% 90% at 70% 45%, #000 45%, transparent 85%);
}
.os-stage__media img {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  max-width: none;
  object-fit: cover;
  object-position: 72% 50%;
  opacity: 0.9;
  animation: os-kenburns 24s var(--ease-io) infinite alternate;
}
@keyframes os-kenburns { from { transform: scale(1.02); } to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); } }
.os-stage__canvas { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; mix-blend-mode: screen; pointer-events: none; }
.os-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 6, 8, 0.9) 0%, rgba(5, 6, 8, 0.5) 45%, rgba(5, 6, 8, 0.1) 80%),
    linear-gradient(0deg, var(--ink-0) 0%, rgba(5, 6, 8, 0) 45%),
    linear-gradient(180deg, rgba(5, 6, 8, 0.7) 0%, rgba(5, 6, 8, 0) 26%);
}
.os-stage__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.os-stage .os-brand { color: var(--bone); }
.os-stage .os-brand span { color: rgba(237, 234, 226, 0.45); }
.os-stage__home { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(237, 234, 226, 0.6); display: inline-flex; gap: 8px; align-items: center; transition: color 0.3s ease; }
.os-stage__home:hover { color: var(--bone); }
.os-stage__home svg { width: 12px; height: 12px; }
.os-stage__body { margin-top: auto; padding-top: 40px; }
.os-stage__title { font-size: clamp(44px, 11vw, 124px); font-weight: 500; letter-spacing: -0.05em; line-height: 0.9; color: var(--bone) !important; max-width: 11ch; }
.os-stage__title em { font-family: var(--font-display); font-style: italic; font-weight: 400; letter-spacing: -0.02em; color: var(--signal); }
.os-stage__lead { margin-top: 18px; max-width: 30em; color: rgba(237, 234, 226, 0.66); font-size: 15px; }
.os-stage__ticker {
  display: none;
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid rgba(237, 234, 226, 0.12);
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(237, 234, 226, 0.45);
}
.os-stage__ticker div { display: grid; gap: 6px; }
.os-stage__ticker b { font-family: var(--font-ui); font-size: 26px; font-weight: 500; letter-spacing: -0.04em; color: var(--bone); text-transform: none; }
.os-stage__ticker b small { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 0.55em; color: var(--signal); margin-left: 3px; letter-spacing: 0; }

.os-panel {
  position: relative;
  z-index: 2;
  margin-top: -36px;
  padding: 30px var(--gut) calc(32px + env(safe-area-inset-bottom));
  border-radius: 30px 30px 0 0;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 -30px 80px -30px rgba(0, 0, 0, 0.8);
}
.os-panel__inner { width: 100%; max-width: 440px; margin: 0 auto; }
.os-steps { display: flex; align-items: center; gap: 8px; margin-bottom: 26px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.os-steps span { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.os-steps span i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; border: 1px solid var(--line-2); font-size: 10px; letter-spacing: 0; transition: all 0.5s var(--ease-out); }
.os-steps span.is-done i { background: var(--pos); border-color: var(--pos); color: var(--ink-0); }
.os-steps span.is-now { color: var(--text); }
.os-steps span.is-now i { background: var(--text); border-color: var(--text); color: var(--bg); box-shadow: 0 0 0 5px var(--accent-soft); }
.os-steps em { flex: 1; min-width: 14px; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.os-steps em.is-done::after { content: ""; position: absolute; inset: 0; background: var(--pos); animation: os-grow-x 0.9s var(--ease-out) both; transform-origin: left; }
@keyframes os-grow-x { from { transform: scaleX(0); } }
.os-panel h1 { font-size: clamp(32px, 7vw, 46px); letter-spacing: -0.045em; line-height: 0.98; }
.os-panel h1 em { font-family: var(--font-display); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -0.02em; }
.os-panel .os-lead { margin-top: 10px; font-size: 14.5px; }
.os-form { margin-top: 26px; }
.os-form__links { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 22px; font-size: 13.5px; color: var(--text-3); }
.os-form__links > div { display: flex; align-items: center; gap: 8px; }
.os-form__alt { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--text-3); }
.os-panel__legal { margin-top: 26px; font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.os-secure { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.os-secure svg { width: 13px; height: 13px; color: var(--pos); }
.os-auth .note { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--warn) !important; padding-left: 12px; border-left: 2px solid color-mix(in srgb, var(--warn) 50%, transparent); }

/* OTP cells (single input, visual cells) */
.os-otp { position: relative; }
.os-otp__cells { display: none; }
html.os-js .os-otp__cells {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 64px;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
html.os-js .os-otp__cells i {
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  font: 500 26px/1 var(--font-mono);
  font-style: normal;
  color: var(--text);
  transition: border-color 0.3s ease, box-shadow 0.4s var(--ease-out), transform 0.45s var(--ease-spring), background 0.3s ease;
}
html.os-js .os-otp__cells i.is-filled { border-color: color-mix(in srgb, var(--text) 38%, transparent); background: var(--surface); animation: os-in-pop 0.35s var(--ease-spring); }
html.os-js .os-otp__cells i.is-caret { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); transform: translateY(-3px); }
html.os-js .os-otp__cells i.is-caret::after { content: ""; width: 1.5px; height: 26px; background: var(--accent); animation: os-blink 1s steps(1) infinite; }
@keyframes os-blink { 50% { opacity: 0; } }
html.os-js .os-otp.is-done .os-otp__cells i { border-color: var(--pos); color: var(--pos); }
html.os-js body.os .os-otp .form-control {
  position: relative;
  z-index: 1;
  height: 64px;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  box-shadow: none;
  letter-spacing: 0;
  font-size: 1px;
}
html.os-js body.os .os-otp .form-control::selection { background: transparent; }
html.os-js body.os .os-otp .form-control::placeholder { color: transparent; }
body.os .os-otp .clear-input { display: none !important; }

/* resend + ring timer */
.os-resend { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 24px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.os-resend .form-links { display: contents; }
.os-resend .os-ring { width: 40px; height: 40px; }
.os-resend .os-ring circle { stroke-width: 4; }
.os-resend__txt { flex: 1; min-width: 0; font-size: 13px; color: var(--text-3); line-height: 1.35; }
.os-resend__txt a { color: var(--text-3); font-weight: 600; }
.os-resend__txt a.text-primary { color: var(--accent) !important; cursor: pointer; }
.os-resend #cuntr { font-family: var(--font-mono); font-size: 13px; color: var(--text); letter-spacing: 0.04em; min-width: 3.4em; text-align: right; }
.os-who { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px dashed var(--line-2); margin-bottom: 20px; }
.os-who .input-wrapper { flex: 1; min-width: 0; }
body.os .os-who .form-control { height: auto; padding: 0; border: 0; background: none; font-size: 15px; font-weight: 600; color: var(--text); box-shadow: none; }
.os-who .label { margin: 0 0 2px !important; }
.os-who .clear-input { display: none !important; }

@media (min-width: 960px) {
  .os-auth { grid-template-columns: minmax(0, 1.25fr) minmax(460px, 1fr); grid-template-rows: none; }
  .os-stage { min-height: 100dvh; padding: 32px clamp(32px, 4vw, 64px) 40px; position: sticky; top: 0; height: 100dvh; }
  .os-stage__ticker { display: flex; }
  .os-panel { margin: 0; border-radius: 0; box-shadow: none; display: flex; align-items: center; padding: 48px clamp(32px, 5vw, 80px); border-left: 1px solid var(--line); }
  .os-panel__inner { max-width: 420px; }
}
@media (min-width: 960px) and (max-height: 700px) { .os-stage__title { font-size: clamp(44px, 7vw, 88px); } }

/* admin auth accent */
.os-auth--admin .os-stage__media img { filter: hue-rotate(-18deg) saturate(0.8); }
.os-badge-admin { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 179, 107, 0.4); color: var(--ember); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }

/* ───────────────────────── EDGE game entry points (game itself: /assets/css/qe-edge.css) ───────────────────────── */
.os-edge .os-help__icon { background: rgba(143, 227, 255, 0.12); color: var(--signal); box-shadow: 0 0 0 1px rgba(143, 227, 255, 0.25), 0 0 30px rgba(143, 227, 255, 0.16); }
.os-edge .os-help__body b em { font-family: var(--font-display); font-style: italic; font-weight: 400; color: var(--signal); letter-spacing: -0.01em; }
.os-edge__line {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 72%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
  transition: opacity 0.5s ease;
  -webkit-mask-image: linear-gradient(90deg, transparent 5%, #000 55%);
  mask-image: linear-gradient(90deg, transparent 5%, #000 55%);
}
.os-edge__line path { fill: none; stroke: var(--signal); stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 1; animation: os-edge-draw 2.6s var(--ease-out) 0.3s forwards; }
.os-edge:hover .os-edge__line { opacity: 0.8; }
.os-edge__live { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--text-2); }
.os-edge__live[hidden] { display: none; }
.os-help__body .os-edge__live b { display: inline; font-size: inherit; font-weight: 600; letter-spacing: inherit; color: var(--text); }
.os-edge__live i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px rgba(74, 222, 128, 0.7); flex: none; }
@keyframes os-edge-draw { to { stroke-dashoffset: 0; } }

.os-rail__tag { margin-left: auto; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-3); transition: color 0.3s ease, border-color 0.3s ease; }
.os-rail__link--edge svg { color: var(--accent); }
.os-rail__link--edge:hover .os-rail__tag { color: var(--accent); border-color: currentColor; }

.os-menu__edge {
  margin: 18px 0 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 16px 18px;
  border-radius: 18px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(143, 227, 255, 0.18), transparent 60%), var(--ink-1);
  border: 1px solid rgba(143, 227, 255, 0.25);
  color: var(--bone);
  transition: transform 0.6s var(--ease-out);
}
.os-menu__edge:hover { color: var(--bone); transform: translateY(-2px); }
.os-menu__edge > svg { flex: none; width: 26px; height: 26px; color: var(--signal); }
.os-menu__edge span { flex: 1; min-width: 0; display: grid; gap: 3px; }
.os-menu__edge b { font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
body.os .os-menu__edge small { font-size: 12.5px; color: rgba(237, 234, 226, 0.62); }
.os-menu__edge i { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--signal); color: #050608; transition: transform 0.6s var(--ease-spring); }
.os-menu__edge i svg { width: 16px; height: 16px; }
.os-menu__edge:hover i { transform: rotate(45deg); }

/* ───────────────────────── Page curtain (shell stays, workspace wipes) ───────────────────────── */
html.os-arrive body::after,
.os-curtain { position: fixed; inset: 0; z-index: 55; background: var(--bg); }
@media (min-width: 1100px) {
  html.os-arrive body.os-app::after,
  body.os-app .os-curtain:not(.is-full) { left: var(--rail-w); }
}
html.os-arrive body::after { content: ""; animation: os-arrive-safety 0.01s linear 2s forwards; }
@keyframes os-arrive-safety { to { visibility: hidden; } }
.os-curtain {
  display: grid;
  place-items: center;
  pointer-events: none;
  visibility: hidden;
  transform: translate3d(0, 101%, 0);
}
.os-curtain.is-full { z-index: 1100; }
.os-curtain::before, .os-curtain::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 60%, transparent);
}
.os-curtain::before { top: 0; }
.os-curtain::after { bottom: 0; }
.os-curtain.is-cover { transform: none; visibility: visible; pointer-events: auto; transition: transform 0.42s var(--ease-io), visibility 0s; }
.os-curtain.is-lift { transform: translate3d(0, -101%, 0); visibility: visible; transition: transform 0.7s var(--ease-io), visibility 0s linear 0.7s; }
.os-curtain.is-instant { transition: none; }
.os-curtain__label { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 0 var(--gut); }
.os-curtain__label small { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.os-curtain__label small:empty { display: none; }
.os-curtain__label span { font-size: clamp(34px, 5.5vw, 76px); font-weight: 500; letter-spacing: -0.045em; line-height: 0.95; color: var(--text); }
.os-curtain.is-cover .os-curtain__label { animation: os-curtain-in 0.5s var(--ease-out) both; }
.os-curtain.is-arrive .os-curtain__label { animation: none; }
.os-curtain.is-lift .os-curtain__label { animation: os-curtain-out 0.45s var(--ease-io) both; }
@keyframes os-curtain-in { from { opacity: 0; transform: translate3d(0, 24px, 0); } }
@keyframes os-curtain-out { to { opacity: 0; transform: translate3d(0, -32px, 0); } }

/* ───────────────────────── Decoding type ───────────────────────── */
.os-wd { display: inline-block; white-space: nowrap; }
.os-ch.is-scr { position: relative; color: transparent !important; }
.os-ch.is-scr::after {
  content: attr(data-g);
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 400;
  font-size: 0.62em;
  letter-spacing: 0;
  color: var(--accent);
  text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 55%, transparent);
}
.os-ch.is-lock { animation: os-lock 0.7s var(--ease-out); }
@keyframes os-lock { from { color: var(--accent); text-shadow: 0 0 24px color-mix(in srgb, var(--accent) 70%, transparent); } }
.os-stage .os-ch.is-scr::after { color: var(--signal); text-shadow: 0 0 18px rgba(143, 227, 255, 0.7); }
.os-stage .os-ch.is-lock { animation-name: os-lock-signal; }
@keyframes os-lock-signal { from { color: var(--signal); text-shadow: 0 0 24px rgba(143, 227, 255, 0.8); } }

/* ───────────────────────── Footer pluck ───────────────────────── */
.os-foot__word[data-os-pluck] { padding: 0.3em 0; margin: -0.3em 0; cursor: grab; touch-action: pan-y; }
.os-foot__word .os-ch { display: inline-block; transform: translate3d(var(--px, 0px), var(--py, 0px), 0) rotate(var(--pr, 0deg)); }
.os-foot__word.is-pluck { cursor: grabbing; }
.os-foot__word.is-pluck .os-ch {
  color: color-mix(in srgb, var(--accent) calc(var(--pg, 0) * 60%), transparent);
  -webkit-text-stroke-color: color-mix(in srgb, var(--accent) calc(min(1, var(--pg, 0) * 2) * 100%), var(--line-2));
}

/* ───────────────────────── Auth stage charge readout ───────────────────────── */
.os-stage.is-charging { cursor: grabbing; }
.os-charge {
  position: absolute;
  left: 0; top: 0;
  z-index: 3;
  display: grid;
  gap: 4px;
  max-width: 240px;
  padding: 12px 14px;
  border-left: 1px solid var(--signal);
  background: linear-gradient(90deg, rgba(5, 6, 8, 0.72), rgba(5, 6, 8, 0));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.os-charge.is-on { opacity: 1; }
.os-charge b { font-family: var(--font-mono); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; color: var(--bone); font-variant-numeric: tabular-nums; }
.os-charge span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--signal); }
.os-charge.is-done b { color: var(--signal); }
@media (hover: none) { .os-charge { max-width: 200px; } .os-charge b { font-size: 18px; } }

/* ───────────────────────── Reduced motion ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .os-grain { display: none; }
  .os-rv, .os-split .os-line > span { opacity: 1 !important; transform: none !important; }
  html.os-arrive body::after, .os-curtain, .os-charge { display: none; }
  .os-ch.is-scr { color: inherit !important; }
  .os-ch.is-scr::after { display: none; }
}
