/* ==========================================================================
   TCN App Layer — premium iOS-style shell for the creator / staff portal.

   Everything here is scoped under html.tx-app, which tcn-app.js adds unless
   the person picked "Classic look". Remove this file + tcn-app.js from a
   page (or flip Classic look on) and that page is byte-for-byte the old UI.
   ========================================================================== */

/* Smooth cross-page transitions (Safari 18.2+, Chrome 126+). The bar and
   tab bar keep their own transition names so they stay put while the page
   underneath slides — that's what makes it feel like one app, not a site. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: tx-vt-out .22s cubic-bezier(.4,0,1,1) both; }
::view-transition-new(root) { animation: tx-vt-in .32s cubic-bezier(.23,1,.32,1) both; }
@keyframes tx-vt-out { to { opacity: 0; transform: scale(.985); } }
@keyframes tx-vt-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

html.tx-app {
  --tx-bg: #050409;
  --tx-raised: #0f0e17;
  --tx-raised-2: #15141f;
  --tx-overlay: #1b1a27;
  --tx-line: rgba(255,255,255,.075);
  --tx-line-strong: rgba(255,255,255,.14);
  --tx-label: #fff;
  --tx-label-2: rgba(235,235,245,.72);
  --tx-label-3: rgba(235,235,245,.46);
  --tx-pink: #e01cff;
  --tx-violet: #8b3dff;
  --tx-blue: #1f8fff;
  --tx-cyan: #22e3ff;
  --tx-grad: linear-gradient(135deg, #e01cff 0%, #8b3dff 38%, #1f8fff 72%, #22e3ff 100%);
  --tx-grad-soft: linear-gradient(135deg, rgba(224,28,255,.18), rgba(31,143,255,.14) 60%, rgba(34,227,255,.12));
  --tx-radius: 22px;
  --tx-radius-sm: 14px;
  --tx-ease: cubic-bezier(.23,1,.32,1);
  --tx-ease-drawer: cubic-bezier(.32,.72,0,1);
  --tx-bar-h: 52px;
  --tx-tab-h: 64px;
  --tx-safe-t: env(safe-area-inset-top, 0px);
  --tx-safe-b: env(safe-area-inset-bottom, 0px);
  --tx-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --tx-font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;

  /* Re-point the site's own design tokens, so every existing page component
     that uses var(--card) / var(--border) / var(--muted) picks up the app
     look automatically without touching its markup. */
  --bg: var(--tx-bg);
  --bg2: var(--tx-raised);
  --card: var(--tx-raised);
  --border: var(--tx-line);
  --muted: var(--tx-label-3);
  --text: var(--tx-label-2);
  --hi: var(--tx-label);
  --pink: var(--tx-pink);
  --violet: var(--tx-violet);
  --blue: var(--tx-blue);
  --cyan: var(--tx-cyan);

  background: var(--tx-bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
}

html.tx-app body {
  background: var(--tx-bg);
  font-family: var(--tx-font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  letter-spacing: -.005em;
}

/* --- Retire the website chrome ------------------------------------------ */
html.tx-app body > nav.nav,
html.tx-app body > .ambient,
html.tx-app .footer,
html.tx-app .ob-footer,
html.tx-app .tx-pills-hidden { display: none !important; }

/* App ambient: soft brand glows + fine film grain, fixed behind everything */
.tx-ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(70% 45% at 0% -6%, rgba(224,28,255,.16), transparent 70%),
    radial-gradient(60% 40% at 105% 4%, rgba(34,227,255,.09), transparent 70%),
    radial-gradient(80% 50% at 50% 115%, rgba(31,143,255,.10), transparent 70%),
    var(--tx-bg); }
/* Pages whose content is a bare <main> (cloud pulls, monthly goals) have no
   .page wrapper to lift them; without this the opaque backdrop paints over them. */
.tx-ambient ~ main { position: relative; z-index: 1; }
.tx-ambient::after { content: ""; position: absolute; inset: 0; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* --- Layout ---------------------------------------------------------------- */
html.tx-app .page {
  padding-top: calc(var(--tx-safe-t) + var(--tx-bar-h) + 4px) !important;
  padding-bottom: calc(var(--tx-safe-b) + var(--tx-tab-h) + 40px);
  min-height: 100dvh;
  animation: tx-page-in .45s var(--tx-ease) both;
}
html.tx-app.tx-no-tabs .page { padding-bottom: calc(var(--tx-safe-b) + 32px); }
@keyframes tx-page-in { from { opacity: 0; transform: translateY(8px); } }

/* Page wrappers from the old site carry desktop-sized top padding. */
html.tx-app .page > div[class$="-wrap"],
html.tx-app .page > .onboarding-wrap,
html.tx-app .page > .login-wrap { padding-top: 6px !important; padding-left: 16px; padding-right: 16px; }

/* Large title (iOS) */
.tx-large { position: relative; z-index: 1; max-width: 920px; margin: 0 auto; padding: 8px 20px 14px; }
.tx-large-kicker { font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--tx-label-3); margin-bottom: 2px; }
.tx-large h1 { font-family: var(--tx-font-display); font-size: 34px; line-height: 1.12; font-weight: 800; letter-spacing: -.025em; color: #fff; margin: 0; }

/* Old page headers become compact, left-aligned subheads under the large title. */
html.tx-app .ob-header { text-align: left !important; margin-bottom: 14px !important; padding: 0 !important; }
html.tx-app .ob-header .ob-logo-wrap,
html.tx-app .page img.ob-logo,
html.tx-app .page .ob-header img[src*="logo"] { display: none !important; }

/* --- Typography ------------------------------------------------------------ */
html.tx-app .h-display,
html.tx-app .h-section {
  font-family: var(--tx-font-display) !important;
  text-transform: none !important;
  letter-spacing: -.02em !important;
  font-weight: 800 !important;
  background: none !important;
  -webkit-text-fill-color: #fff !important;
  color: #fff !important;
}
html.tx-app .h-section { font-size: 22px !important; line-height: 1.2; }
html.tx-app .h-display { font-size: clamp(30px, 8vw, 44px) !important; line-height: 1.05; }
html.tx-app .eyebrow {
  font-family: var(--tx-font) !important; font-size: 12px !important; font-weight: 700 !important;
  letter-spacing: .08em !important; margin-bottom: 6px !important;
}
html.tx-app .gradient-text { -webkit-text-fill-color: transparent !important; background: var(--tx-grad) !important; -webkit-background-clip: text !important; background-clip: text !important; }
html.tx-app h1, html.tx-app h2, html.tx-app h3, html.tx-app h4 { font-family: var(--tx-font-display); }
html.tx-app [style*="Orbitron"] { font-family: var(--tx-font-display) !important; letter-spacing: .01em !important; }

/* --- Surfaces -------------------------------------------------------------- */
html.tx-app .card,
html.tx-app .perf-card,
html.tx-app .login-card,
html.tx-app [class$="-card"]:not(.tx-tile):not(.contact-card) {
  border-radius: var(--tx-radius) !important;
  background: linear-gradient(180deg, var(--tx-raised-2), var(--tx-raised)) !important;
  border: 1px solid var(--tx-line) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 1px 0 rgba(0,0,0,.5), 0 24px 48px -30px rgba(0,0,0,.95);
}
html.tx-app .card::before { display: none; }
html.tx-app .card:hover { transform: none; }

/* --- Controls -------------------------------------------------------------- */
html.tx-app a, html.tx-app button, html.tx-app .tx-press { -webkit-tap-highlight-color: transparent; }
html.tx-app button, html.tx-app .btn, html.tx-app .tx-press { transition: transform .16s var(--tx-ease), opacity .16s, background-color .2s, border-color .2s; }
html.tx-app button:active:not(:disabled), html.tx-app .btn:active, html.tx-app .tx-press:active { transform: scale(.97); }

html.tx-app .btn { border-radius: 999px !important; min-height: 46px; font-family: var(--tx-font) !important; font-weight: 700 !important; letter-spacing: -.01em !important; justify-content: center; }
html.tx-app .btn-primary {
  background: var(--tx-grad) !important; color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(0,0,0,.2), 0 14px 30px -14px rgba(176,40,255,.85) !important;
}
html.tx-app .btn-primary:hover { transform: none; }
html.tx-app .btn-outline { background: rgba(255,255,255,.06) !important; border: 1px solid var(--tx-line-strong) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }

/* iOS zooms the page when a focused field is under 16px — never let it. */
html.tx-app input:not([type=checkbox]):not([type=radio]):not([type=range]),
html.tx-app select, html.tx-app textarea { font-size: 16px !important; }
html.tx-app .form-input,
html.tx-app input[type=text], html.tx-app input[type=email], html.tx-app input[type=password],
html.tx-app input[type=search], html.tx-app input[type=number], html.tx-app input[type=tel],
html.tx-app input[type=url], html.tx-app input[type=date], html.tx-app input[type=time],
html.tx-app textarea, html.tx-app select {
  border-radius: var(--tx-radius-sm) !important;
  background-color: rgba(255,255,255,.045) !important;
  border: 1px solid var(--tx-line) !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.45);
  color: #fff;
  transition: border-color .16s var(--tx-ease), box-shadow .16s var(--tx-ease);
}
html.tx-app input:focus, html.tx-app textarea:focus, html.tx-app select:focus {
  outline: none !important; border-color: rgba(176,90,255,.65) !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.45), 0 0 0 4px rgba(176,90,255,.16) !important;
}
html.tx-app .form-label { font-family: var(--tx-font) !important; font-size: 12px !important; letter-spacing: .06em !important; color: var(--tx-label-3) !important; }

/* "Loading…" placeholders become shimmering skeletons. */
html.tx-app [class$="-loading"], html.tx-app [class$="-empty"]:empty {
  position: relative; overflow: hidden; border-radius: var(--tx-radius);
  background: var(--tx-raised); border: 1px solid var(--tx-line);
  padding: 22px 18px; color: var(--tx-label-3); font-size: 14px;
}
html.tx-app [class$="-loading"]::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
  animation: tx-shimmer 1.4s infinite;
}
@keyframes tx-shimmer { to { transform: translateX(100%); } }

/* Old scroll-reveal never fires on some app pages; just show content. */
html.tx-app .fade-in { opacity: 1 !important; transform: none !important; }

/* --- Top bar --------------------------------------------------------------- */
.tx-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  padding-top: var(--tx-safe-t);
  view-transition-name: tx-bar;
  transition: background-color .25s, border-color .25s, backdrop-filter .25s;
  border-bottom: .5px solid transparent;
}
.tx-bar.tx-scrolled {
  background: rgba(8,7,13,.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: rgba(255,255,255,.08);
}
.tx-bar-inner { height: var(--tx-bar-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 0 12px; max-width: 1100px; margin: 0 auto; }
.tx-bar-left { display: flex; align-items: center; min-width: 0; }
.tx-bar-right { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.tx-bar-title { font-family: var(--tx-font-display); font-size: 17px; font-weight: 700; letter-spacing: -.01em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw;
  opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .25s var(--tx-ease); }
.tx-bar.tx-scrolled .tx-bar-title { opacity: 1; transform: none; }
.tx-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: #fff; }
.tx-brand img { width: 34px; height: 34px; border-radius: 10px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(224,28,255,.35)); }
.tx-brand span { font-family: 'Orbitron', var(--tx-font-display); font-weight: 800; font-size: 13px; letter-spacing: .14em;
  background: linear-gradient(180deg,#fff,#b9c8e0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tx-back { display: inline-flex; align-items: center; gap: 2px; padding: 8px 6px 8px 0; margin-left: -4px; background: none; border: 0; color: var(--tx-cyan); font: 600 17px/1 var(--tx-font); letter-spacing: -.01em; text-decoration: none; cursor: pointer; }
.tx-back svg { width: 26px; height: 26px; stroke-width: 2.4; }
.tx-iconbtn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--tx-line); background: rgba(255,255,255,.06); color: #fff; cursor: pointer; padding: 0; }
.tx-iconbtn svg { width: 20px; height: 20px; }
.tx-avatar { width: 36px; height: 36px; border-radius: 50%; padding: 2px; background: var(--tx-grad); border: 0; cursor: pointer; display: grid; place-items: center; }
.tx-avatar span { width: 100%; height: 100%; border-radius: 50%; background: #0d0c15; display: grid; place-items: center; font: 700 13px/1 var(--tx-font); color: #fff; letter-spacing: .02em; }

/* --- Tab bar (floating glass pill) ---------------------------------------- */
.tx-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; pointer-events: none;
  padding: 8px 14px calc(var(--tx-safe-b) + 10px);
  view-transition-name: tx-tabbar;
}
.tx-tabbar::before { content: ""; position: absolute; inset: -30px 0 0; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(5,4,9,.85) 60%); }
.tx-tabs {
  position: relative; pointer-events: auto; margin: 0 auto; max-width: 440px; height: var(--tx-tab-h);
  display: flex; align-items: stretch; padding: 6px; border-radius: 999px;
  background: rgba(14,13,22,.72);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 24px 48px -16px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.5);
}
.tx-tab-ind {
  position: absolute; top: 6px; bottom: 6px; left: 6px; border-radius: 999px;
  width: calc((100% - 12px) / var(--tx-n, 5));
  transform: translateX(calc(var(--tx-i, 0) * 100%));
  transition: transform .42s var(--tx-ease-drawer);
  background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.05));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 0 1px rgba(255,255,255,.05);
}
.tx-tab-ind::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: -1px; height: 2px; border-radius: 2px; background: var(--tx-grad); box-shadow: 0 0 12px rgba(176,90,255,.9); }
.tx-tab {
  position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: 999px; text-decoration: none; color: rgba(235,235,245,.5);
  font: 700 10px/1 var(--tx-font); letter-spacing: .01em; transition: color .2s, transform .16s var(--tx-ease);
}
.tx-tab:active { transform: scale(.92); }
.tx-tab svg { width: 24px; height: 24px; stroke-width: 1.8; transition: transform .3s var(--tx-ease); }
.tx-tab.tx-on { color: #fff; }
.tx-tab.tx-on svg { stroke: url(#tx-grad-stroke); transform: translateY(-1px); filter: drop-shadow(0 0 8px rgba(176,90,255,.55)); }
.tx-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: #ff2d55; color: #fff; font: 700 11px/17px var(--tx-font); text-align: center; box-shadow: 0 0 0 2px rgba(14,13,22,.9); }

/* --- Sheets ---------------------------------------------------------------- */
.tx-scrim { position: fixed; inset: 0; z-index: 950; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .3s; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.tx-scrim.tx-open { opacity: 1; pointer-events: auto; }
.tx-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 960; max-width: 560px; margin: 0 auto;
  max-height: 88dvh; overflow: auto; overscroll-behavior: contain;
  border-radius: 28px 28px 0 0; padding: 8px 18px calc(var(--tx-safe-b) + 22px);
  background: linear-gradient(180deg, #17161f, #0e0d15);
  border: 1px solid rgba(255,255,255,.09); border-bottom: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 -30px 60px -20px rgba(0,0,0,.8);
  transform: translateY(105%); transition: transform .45s var(--tx-ease-drawer);
}
.tx-sheet.tx-open { transform: none; }
.tx-grabber { width: 38px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.22); margin: 4px auto 14px; }
.tx-sheet-head { display: flex; align-items: center; gap: 14px; padding: 4px 4px 18px; }
.tx-sheet-head .tx-avatar { width: 52px; height: 52px; cursor: default; }
.tx-sheet-head .tx-avatar span { font-size: 18px; }
.tx-sheet-name { font: 800 20px/1.15 var(--tx-font-display); color: #fff; letter-spacing: -.02em; }
.tx-sheet-sub { font: 500 13px/1.3 var(--tx-font); color: var(--tx-label-3); margin-top: 3px; }
.tx-section-label { font: 700 12px/1 var(--tx-font); letter-spacing: .08em; text-transform: uppercase; color: var(--tx-label-3); margin: 18px 6px 10px; }

/* App-icon grid */
.tx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 8px; }
@media (min-width: 520px) { .tx-grid { grid-template-columns: repeat(5, 1fr); } }
.tx-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; text-decoration: none; color: var(--tx-label-2); font: 600 11.5px/1.15 var(--tx-font); text-align: center; letter-spacing: -.005em; min-width: 0; }
.tx-tile:active .tx-ic { transform: scale(.92); }
.tx-ic { position: relative; width: 60px; height: 60px; border-radius: 17px; display: grid; place-items: center; color: #fff; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 6px rgba(0,0,0,.25), 0 10px 22px -10px var(--tx-glow, rgba(176,90,255,.8));
  transition: transform .18s var(--tx-ease); }
.tx-ic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.22), transparent 48%); pointer-events: none; }
.tx-ic svg { width: 28px; height: 28px; stroke-width: 1.9; position: relative; z-index: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.tx-ic-badge { position: absolute; top: -5px; right: -5px; z-index: 2; }

/* Grouped list (iOS Settings style) */
.tx-list { border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.04); border: 1px solid var(--tx-line); }
.tx-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-height: 50px; color: #fff; text-decoration: none; font: 500 16px/1.2 var(--tx-font); background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.tx-row + .tx-row { border-top: .5px solid rgba(255,255,255,.08); }
.tx-row:active { background: rgba(255,255,255,.06); }
.tx-row .tx-row-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.tx-row .tx-row-ic svg { width: 18px; height: 18px; stroke-width: 2; }
.tx-row .tx-row-label { flex: 1; min-width: 0; }
.tx-row .tx-row-sub { display: block; font-size: 12.5px; color: var(--tx-label-3); margin-top: 2px; }
.tx-row .tx-chev { width: 18px; height: 18px; color: rgba(235,235,245,.3); }
.tx-row.tx-danger { color: #ff453a; }
.tx-switch { position: relative; width: 51px; height: 31px; border-radius: 16px; background: rgba(120,120,128,.32); transition: background .25s; flex: none; }
.tx-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.25); transition: transform .3s var(--tx-ease-drawer); }
.tx-switch.tx-on { background: #34c759; }
.tx-switch.tx-on::after { transform: translateX(20px); }

/* --- Home (dashboard) ------------------------------------------------------ */
.tx-hero { position: relative; overflow: hidden; border-radius: 26px; padding: 20px; margin: 0 0 18px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(224,28,255,.32), transparent 55%),
    radial-gradient(120% 90% at 100% 100%, rgba(34,227,255,.22), transparent 55%),
    linear-gradient(160deg, #1a1030, #0b0d1c 60%, #071422);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 30px 60px -30px rgba(120,40,255,.55); }
.tx-hero-wave { position: absolute; left: -10%; right: -10%; bottom: -2px; height: 70px; opacity: .55; pointer-events: none; }
.tx-hero-wave path { animation: tx-wave-drift 7s ease-in-out infinite alternate; }
.tx-hero-wave path:nth-child(2) { animation-duration: 9s; animation-direction: alternate-reverse; }
@keyframes tx-wave-drift { from { transform: translateX(-4%); } to { transform: translateX(4%); } }
.tx-hero-mark { position: absolute; right: -18px; top: -14px; width: 150px; height: 150px; opacity: .22; filter: blur(.2px); pointer-events: none; }
.tx-hero-row { position: relative; display: flex; align-items: center; gap: 14px; }
.tx-hero .tx-avatar { width: 56px; height: 56px; cursor: default; box-shadow: 0 0 24px rgba(224,28,255,.45); }
.tx-hero .tx-avatar span { font-size: 19px; }
.tx-hero-hello { font: 600 13px/1.2 var(--tx-font); color: rgba(255,255,255,.65); }
.tx-hero-name { font: 800 24px/1.1 var(--tx-font-display); color: #fff; letter-spacing: -.025em; margin-top: 2px; }
.tx-chips { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.1); font: 600 12px/1 var(--tx-font); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); text-decoration: none; }
.tx-chip i { width: 7px; height: 7px; border-radius: 50%; background: #34c759; box-shadow: 0 0 8px #34c759; font-style: normal; }
.tx-quick { margin: 4px 0 22px; padding: 18px 12px 16px; border-radius: var(--tx-radius); background: linear-gradient(180deg, var(--tx-raised-2), var(--tx-raised)); border: 1px solid var(--tx-line); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }

/* Dashboard data cards (rendered by the page's own script) */
html.tx-app .perf-section-title { font: 800 20px/1.2 var(--tx-font-display) !important; letter-spacing: -.02em !important; color: #fff !important; text-transform: none !important; margin: 26px 2px 12px !important; }
html.tx-app .perf-grid { gap: 12px !important; }
html.tx-app .perf-card { padding: 18px !important; }
html.tx-app .perf-card-label { font: 700 12px/1 var(--tx-font) !important; letter-spacing: .06em !important; text-transform: uppercase; color: var(--tx-label-3) !important; }
html.tx-app .perf-card-value { font: 800 34px/1.05 var(--tx-font-display) !important; letter-spacing: -.03em !important; margin: 8px 0 12px !important;
  background: linear-gradient(180deg, #fff, #c9d6ff) !important; -webkit-background-clip: text !important; background-clip: text !important; -webkit-text-fill-color: transparent !important; }
html.tx-app .perf-card-row { font-size: 13.5px !important; padding: 7px 0 !important; border-top: .5px solid rgba(255,255,255,.07) !important; }
html.tx-app .perf-mini-stats { gap: 10px !important; }
html.tx-app .perf-mini-stat { border-radius: 18px !important; background: var(--tx-raised) !important; border: 1px solid var(--tx-line) !important; padding: 14px !important; }
html.tx-app .perf-mini-num { font-family: var(--tx-font-display) !important; font-weight: 800 !important; letter-spacing: -.02em; }
html.tx-app .perf-pos { color: #30d158 !important; }
html.tx-app .perf-neg { color: #ff453a !important; }
html.tx-app .ob-rule { display: none; }
html.tx-app .last-updated-line { font-size: 12px; color: var(--tx-label-3); text-align: left; margin: 0 2px 10px; }

/* --- Sign in ---------------------------------------------------------------- */
.tx-login-mark { display: block; width: 132px; height: 132px; margin: 4px auto 6px; filter: drop-shadow(0 0 26px rgba(224,28,255,.45)) drop-shadow(0 0 50px rgba(34,227,255,.25)); animation: tx-float 6s ease-in-out infinite; }
@keyframes tx-float { 50% { transform: translateY(-7px); } }
html.tx-app .login-wrap { padding-top: 0 !important; max-width: 430px; }
html.tx-app .login-wrap > .h-section { font-size: 30px !important; margin-bottom: 4px !important; }
html.tx-app .login-card { padding: 22px 18px !important; margin-top: 18px !important; }
html.tx-app .login-tabs { border-radius: 999px !important; padding: 4px !important; background: rgba(118,118,128,.18) !important; border: 0 !important; }
html.tx-app .login-tab { font: 700 14px/1 var(--tx-font) !important; letter-spacing: -.01em !important; text-transform: none !important; border-radius: 999px !important; padding: 11px 8px !important; color: var(--tx-label-2) !important; }
html.tx-app .login-tab.active { background: rgba(255,255,255,.92) !important; color: #0b0a12 !important; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
html.tx-app .login-submit { min-height: 52px; font-size: 16px !important; }

/* --- Pull to refresh -------------------------------------------------------- */
.tx-ptr { position: fixed; top: calc(var(--tx-safe-t) + var(--tx-bar-h) + 6px); left: 50%; z-index: 880; width: 40px; height: 40px; margin-left: -20px; border-radius: 50%;
  background: rgba(20,19,30,.9); border: 1px solid var(--tx-line-strong); display: grid; place-items: center;
  transform: translateY(-70px) scale(.6); opacity: 0; pointer-events: none; }
.tx-ptr svg { width: 22px; height: 22px; }
.tx-ptr.tx-spin svg { animation: tx-rot .8s linear infinite; }
@keyframes tx-rot { to { transform: rotate(360deg); } }

/* --- Classic toggle pill (shown on classic pages) -------------------------- */
.tx-classic-pill { position: fixed; right: 14px; bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); z-index: 999;
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(14,13,22,.85); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: #fff;
  font: 700 13px/1 -apple-system, BlinkMacSystemFont, Inter, sans-serif; cursor: pointer; box-shadow: 0 14px 30px -12px rgba(176,40,255,.7); }
.tx-classic-pill b { background: linear-gradient(135deg,#e01cff,#22e3ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* --- Toast ----------------------------------------------------------------- */
.tx-toast { position: fixed; left: 50%; top: calc(var(--tx-safe-t, 0px) + 12px); z-index: 1200; transform: translate(-50%, -140%); transition: transform .45s var(--tx-ease-drawer);
  padding: 12px 18px; border-radius: 999px; background: rgba(28,27,40,.92); border: 1px solid rgba(255,255,255,.12); color: #fff; font: 600 14px/1.2 var(--tx-font);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 20px 40px -16px rgba(0,0,0,.8); white-space: nowrap; }
.tx-toast.tx-open { transform: translate(-50%, 0); }

/* --- Launch intro ----------------------------------------------------------- */
.tx-intro { position: fixed; inset: 0; z-index: 2000; overflow: hidden; display: grid; place-items: center; cursor: pointer;
  background:
    radial-gradient(60% 40% at 0% 0%, rgba(70,0,90,.75), transparent 70%),
    radial-gradient(60% 40% at 100% 100%, rgba(0,55,90,.75), transparent 70%),
    #000;
  transition: opacity .55s ease, transform .7s var(--tx-ease); }
.tx-intro.tx-out { opacity: 0; transform: scale(1.06); pointer-events: none; }
.tx-intro-stage { position: relative; width: 36vmin; height: 36vmin; max-width: 300px; max-height: 300px; }
.tx-intro-mark { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3;
  animation: tx-mark 2.6s var(--tx-ease) both; }
@keyframes tx-mark {
  0%, 8% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(224,28,255,0)); }
  40% { transform: scale(1.1); filter: drop-shadow(0 0 28px rgba(224,28,255,.75)) drop-shadow(0 0 60px rgba(34,227,255,.45)); }
  62%, 100% { transform: scale(1.04); filter: drop-shadow(0 0 18px rgba(224,28,255,.5)) drop-shadow(0 0 40px rgba(34,227,255,.3)); }
}
.tx-intro-sheen { position: absolute; inset: 0; z-index: 4; pointer-events: none;
  -webkit-mask: var(--tx-mark-url) center/contain no-repeat; mask: var(--tx-mark-url) center/contain no-repeat; }
.tx-intro-sheen::before { content: ""; position: absolute; top: -20%; bottom: -20%; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.85), transparent);
  animation: tx-sheen 1s .95s cubic-bezier(.5,0,.3,1) both; }
@keyframes tx-sheen { to { left: 130%; } }
.tx-intro-ring { position: absolute; inset: -22%; z-index: 2; width: 144%; height: 144%; animation: tx-ring-rot 2.6s linear both; }
.tx-intro-ring circle { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600;
  animation: tx-ring-draw 1.1s .25s cubic-bezier(.65,0,.35,1) forwards; filter: drop-shadow(0 0 4px rgba(224,28,255,.9)); }
.tx-intro-ring circle + circle { stroke-width: .8; opacity: .6; animation-delay: .4s; }
@keyframes tx-ring-draw { to { stroke-dashoffset: 0; } }
@keyframes tx-ring-rot { from { transform: rotate(-100deg); } to { transform: rotate(40deg); } }
.tx-intro-pulse { position: absolute; inset: -8%; z-index: 1; border-radius: 50%; border: 2px solid rgba(34,227,255,.6); opacity: 0;
  animation: tx-pulse 1.3s .75s ease-out both; }
.tx-intro-pulse + .tx-intro-pulse { border-color: rgba(224,28,255,.55); animation-delay: .95s; }
@keyframes tx-pulse { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.9); } }
.tx-intro-word { position: absolute; left: 0; right: 0; top: calc(50% + min(18vmin, 150px) + 30px); text-align: center; z-index: 3; }
.tx-intro-word b { display: block; font: 900 clamp(20px, 6vmin, 34px)/1 'Orbitron', var(--tx-font-display, sans-serif); letter-spacing: .32em; padding-left: .32em;
  background: linear-gradient(180deg, #fff, #aebfe0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: tx-word 1.1s .7s var(--tx-ease) both; }
.tx-intro-word small { display: block; margin-top: 10px; font: 700 clamp(9px, 2.4vmin, 12px)/1 'Orbitron', sans-serif; letter-spacing: .5em; padding-left: .5em; color: #22e3ff;
  animation: tx-word 1.1s .95s var(--tx-ease) both; }
@keyframes tx-word { from { opacity: 0; letter-spacing: .9em; filter: blur(6px); } }
.tx-intro-waves { position: absolute; left: 0; right: 0; bottom: 0; height: 46vh; z-index: 1; pointer-events: none; }
.tx-intro-waves svg { position: absolute; left: -25%; width: 150%; bottom: 0; height: 100%; }
.tx-intro-waves svg:nth-child(1) { animation: tx-swell 2.6s cubic-bezier(.3,.6,.2,1) both, tx-sway 3.2s ease-in-out infinite alternate; opacity: .55; }
.tx-intro-waves svg:nth-child(2) { animation: tx-swell 2.6s .12s cubic-bezier(.3,.6,.2,1) both, tx-sway 2.6s ease-in-out infinite alternate-reverse; opacity: .75; }
.tx-intro-waves svg:nth-child(3) { animation: tx-swell 2.6s .24s cubic-bezier(.3,.6,.2,1) both, tx-sway 2.2s ease-in-out infinite alternate; }
@keyframes tx-swell { 0% { transform: translateY(100%); } 45% { transform: translateY(18%); } 100% { transform: translateY(42%); } }
@keyframes tx-sway { from { margin-left: -4%; } to { margin-left: 4%; } }
.tx-intro-spray { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.tx-intro-spray i { position: absolute; bottom: 30vh; width: 4px; height: 4px; border-radius: 50%; background: #bff6ff; box-shadow: 0 0 8px #22e3ff; opacity: 0;
  animation: tx-spray 1.6s var(--d, .6s) cubic-bezier(.2,.7,.3,1) both; }
@keyframes tx-spray { 0% { opacity: 0; transform: translate(0,0) scale(.6); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x, 0), var(--y, -40vh)) scale(1.1); } }
.tx-intro-skip { position: absolute; right: 18px; top: calc(env(safe-area-inset-top, 0px) + 14px); z-index: 5; font: 600 13px/1 -apple-system, Inter, sans-serif; color: rgba(255,255,255,.55); padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.08); }

@media (prefers-reduced-motion: reduce) {
  .tx-intro *, .tx-intro *::before { animation: none !important; }
  .tx-intro-ring circle { stroke-dashoffset: 0; }
  .tx-tab-ind, .tx-sheet { transition-duration: .01s; }
  html.tx-app .page { animation: none; }
}

/* Wider screens: keep the app column comfortable but let data pages breathe. */
@media (min-width: 900px) {
  .tx-large { padding-left: 24px; padding-right: 24px; }
}

/* Old page shown inside an app.html screen: the app provides the bars. */
html.tx-embed .page { padding-top: 8px !important; padding-bottom: calc(var(--tx-safe-b) + 24px); }

/* ===== Navy "ultra premium" theme for every app screen and embedded page ===== */
html.tx-app {
  --tx-bg: #050a16;
  --tx-raised: #0b1322;
  --tx-raised-2: #0e182b;
  --tx-overlay: #13203a;
  --tx-line: rgba(110,150,220,.16);
  --tx-line-strong: rgba(110,150,220,.3);
  --tx-label-2: rgba(210,222,245,.82);
  --tx-label-3: rgba(190,205,235,.6);
  --tx-pink: #3d8bff;
  --tx-violet: #2f6bff;
  --tx-blue: #1e8fff;
  --tx-cyan: #3fc3ff;
  --tx-grad: linear-gradient(180deg, #2f8cff, #1450d0);
  --tx-grad-soft: linear-gradient(135deg, rgba(47,140,255,.18), rgba(63,195,255,.1));
}
html.tx-app body { background: #050a16; }
.tx-ambient, .ax-screen-bg { background: radial-gradient(90% 50% at 100% 0%, rgba(30,110,255,.2), transparent 70%), radial-gradient(80% 40% at 0% 100%, rgba(30,90,200,.1), transparent 70%), linear-gradient(180deg, #071022, #050a16 60%, #04080f) !important; }
.ax-nav.ax-solid, .tx-bar.tx-scrolled { background: rgba(6,12,26,.8) !important; }
.ax-card-glow, .tx-hero { background: linear-gradient(105deg, rgba(10,20,42,.95), rgba(10,24,52,.85)), #0a1428 !important; border: 1px solid rgba(70,140,255,.45) !important; box-shadow: 0 0 24px rgba(40,120,255,.18), inset 0 1px 0 rgba(255,255,255,.06) !important; }
.ax-btn-primary, html.tx-app .btn-primary { box-shadow: 0 0 20px rgba(47,140,255,.45), inset 0 1px 0 rgba(255,255,255,.3) !important; }
.ax-grad-text { background: none !important; -webkit-text-fill-color: #3fd0ff !important; color: #3fd0ff; }
.ax-sheet { background: linear-gradient(180deg, #0f1a2e, #0a1222) !important; border-color: rgba(110,150,220,.2) !important; }
.ax-actions-group { background: rgba(16,26,46,.94) !important; }
.ax-seg-ind { background: linear-gradient(180deg, #2f8cff, #1450d0) !important; box-shadow: 0 0 14px rgba(47,140,255,.45) !important; }
.ax-avatar:not(.ax-ring):not(.ax-ai-av) { background: linear-gradient(145deg, #2a6bff, #173f9e) !important; }
.ax-avatar.ax-ring { background: linear-gradient(145deg, #3fd0ff, #2f6bff) !important; }
.ax-avatar.ax-ring > span { background: #08101f !important; }
.ax-pill.ax-purple { background: rgba(47,140,255,.14); color: #8cc4ff; border-color: rgba(47,140,255,.3); }
.ax-bar > i { background: linear-gradient(90deg, #2f8cff, #3fd0ff) !important; box-shadow: 0 0 10px rgba(63,208,255,.6) !important; }
html.tx-app input:focus, html.tx-app textarea:focus, html.tx-app select:focus, .ax-field:focus { border-color: rgba(63,160,255,.7) !important; box-shadow: 0 0 0 4px rgba(47,140,255,.18) !important; }
