/* TradeTracking.com executive console (served from /app/console, mounted on the Webflow page /admin) */
:root {
  --bg: #050a07; --surface: #0a1510; --surface-2: #0e1c15; --border: #1b3626; --border-2: #24442f;
  --text: #e8f2ec; --muted: #a9bfb2; --faint: #7f978a; --accent: #22e06b; --accent-soft: rgba(34,224,107,0.12);
  --neg: #ff6b6b; --warn: #f5c04e;
}
html, body { background: var(--bg) !important; }
body { margin: 0; }
body > *:not(#ttx) { display: none !important; }
#ttx, #ttx * { box-sizing: border-box; }
#ttx {
  min-height: 100vh; color: var(--text); font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(ellipse at 50% -10%, rgba(34,224,107,0.08), transparent 55%), var(--bg);
  -webkit-font-smoothing: antialiased;
}
#ttx a { color: inherit; }
#ttx h1, #ttx h2, #ttx h3 { margin: 0; color: #fff; letter-spacing: -0.01em; }
#ttx h1 { font-size: 24px; }
#ttx h2 { font-size: 15px; }
#ttx .num { font-variant-numeric: tabular-nums; }
#ttx .muted { color: var(--muted); }
#ttx .faint { color: var(--faint); }
#ttx .small { font-size: 12.5px; }
#ttx .pos { color: var(--accent); }
#ttx .neg { color: var(--neg); }

/* logo */
.x-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.x-logo-bars { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.x-logo-bars i { display: block; width: 4px; border-radius: 1px; background: var(--accent); }
.x-logo-bars i:nth-child(1) { height: 6px; } .x-logo-bars i:nth-child(2) { height: 11px; } .x-logo-bars i:nth-child(3) { height: 16px; }
.x-logo-text { font-size: 18px; font-style: italic; font-weight: 800; letter-spacing: -0.5px; color: #fff; line-height: 1; }
.x-logo-text b { color: var(--accent); font-weight: 800; }
.x-tag { font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 999px; }

/* buttons, inputs */
#ttx .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap; }
#ttx .btn:hover { border-color: var(--accent); }
#ttx .btn-primary { background: var(--accent); border-color: var(--accent); color: #03140a; }
#ttx .btn-primary:hover { filter: brightness(1.08); }
#ttx .btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
#ttx .btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
#ttx .btn-ghost:hover { color: var(--text); border-color: var(--border-2); }
#ttx .btn-danger { color: var(--neg); }
#ttx .btn[disabled] { opacity: 0.6; cursor: default; }
#ttx input, #ttx select { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-2); background: #07100b; color: var(--text); font: inherit; outline: none; }
#ttx input:focus, #ttx select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#ttx label.f { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
#ttx .stack { display: grid; gap: 14px; }
#ttx .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#ttx .alert { padding: 11px 14px; border-radius: 10px; border: 1px solid; font-size: 13.5px; margin-bottom: 16px; }
#ttx .alert-error { border-color: rgba(255,107,107,0.4); background: rgba(255,107,107,0.08); color: #ffc9c9; }
#ttx .alert-ok { border-color: rgba(34,224,107,0.35); background: var(--accent-soft); color: #c9f7da; }
#ttx .alert-warn { border-color: rgba(245,192,78,0.4); background: rgba(245,192,78,0.08); color: #f8dfa6; }

/* auth screens */
.x-auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.x-auth-box { width: 100%; max-width: 400px; }
.x-auth-head { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 18px; }
.x-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.x-auth .x-card { padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,0.45); }
.x-auth h1 { font-size: 22px; margin-bottom: 4px !important; }
.x-auth-foot { text-align: center; margin-top: 16px; }

/* shell */
.x-head { position: sticky; top: 0; z-index: 10; background: rgba(5,10,7,0.88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.x-wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.x-head-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.x-head-r { display: flex; align-items: center; gap: 12px; }
.x-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.x-tabs a { padding: 12px 14px 11px; color: var(--muted); font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.x-tabs a:hover { color: var(--text); }
.x-tabs a.on { color: #fff; border-bottom-color: var(--accent); }
.x-main { padding-top: 26px; padding-bottom: 64px; }
.x-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.x-title p { margin: 4px 0 0; }

/* cards and grids */
.x-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.x-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.x-kpi .l { color: var(--faint); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.x-kpi .v { font-size: 26px; font-weight: 800; color: #fff; margin-top: 6px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.x-kpi .v.pos { color: var(--accent); } .x-kpi .v.neg { color: var(--neg); }
.x-kpi .h { color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.x-kpi.big { background: linear-gradient(160deg, rgba(34,224,107,0.12), var(--surface) 60%); border-color: #1f4430; }
.x-kpi.big .v { font-size: 32px; }
.x-grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.x-grid-h { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.x-sec { margin-top: 16px; }
.x-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; }

/* charts */
.x-bars { display: flex; align-items: flex-end; gap: 3px; height: 170px; }
.x-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; position: relative; }
.x-bar span { display: block; width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; opacity: 0.85; }
.x-bar span.z { background: var(--border-2); opacity: 1; }
.x-bar:hover span { opacity: 1; }
.x-bar:hover::after { content: attr(data-t); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #000; border: 1px solid var(--border-2); padding: 3px 7px; border-radius: 6px; font-size: 11.5px; white-space: nowrap; z-index: 2; }
.x-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--faint); font-size: 12px; }
.x-list { display: grid; gap: 10px; }
.x-li { display: grid; grid-template-columns: minmax(0, 1.2fr) 2fr auto; gap: 12px; align-items: center; font-size: 13px; }
.x-li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-track { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.x-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.x-funnel { display: grid; gap: 12px; }
.x-step { display: grid; gap: 5px; font-size: 13px; }
.x-step-top { display: flex; justify-content: space-between; gap: 10px; }

/* tables */
.x-table-wrap { overflow-x: auto; margin: 0 -4px; }
#ttx table { width: 100%; border-collapse: collapse; font-size: 13px; }
#ttx th { text-align: left; color: var(--faint); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
#ttx td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
#ttx tr:last-child td { border-bottom: 0; }
#ttx .r { text-align: right; }
#ttx tbody tr.click { cursor: pointer; }
#ttx tbody tr.click:hover td { background: var(--surface-2); }
.x-link { text-decoration: none; font-weight: 600; color: #fff !important; }
.x-link:hover { color: var(--accent) !important; }
.x-trunc { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--muted); white-space: nowrap; }
.x-badge.ok { color: var(--accent); border-color: rgba(34,224,107,0.35); background: var(--accent-soft); }
.x-badge.warn { color: var(--warn); border-color: rgba(245,192,78,0.35); background: rgba(245,192,78,0.08); }
.x-badge.bad { color: var(--neg); border-color: rgba(255,107,107,0.35); background: rgba(255,107,107,0.08); }

/* users */
.x-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.x-search { display: flex; gap: 8px; flex: 1 1 280px; max-width: 420px; }
.x-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.x-chips a { padding: 6px 11px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; color: var(--muted); text-decoration: none; background: var(--surface); white-space: nowrap; }
.x-chips a.on { color: #fff; border-color: var(--accent); background: var(--accent-soft); }
.x-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.x-dl { display: grid; grid-template-columns: max-content 1fr; gap: 9px 18px; margin: 0; font-size: 13px; }
.x-dl dt { color: var(--faint); }
.x-dl dd { margin: 0; word-break: break-word; }
.x-feed { list-style: none; margin: 0; padding: 0; }
.x-feed li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.x-feed li:last-child { border-bottom: 0; }
.x-copy { display: flex; gap: 8px; margin-top: 10px; }
.x-copy input { font-size: 12.5px !important; }
.x-loading { padding: 80px 0; text-align: center; color: var(--faint); }

@media (max-width: 900px) {
  .x-grid2, .x-grid-h { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .x-wrap { padding: 0 16px; }
  .x-me { display: none; }
  .x-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .x-kpi { padding: 14px; }
  .x-kpi .v, .x-kpi.big .v { font-size: 22px; }
  .x-bars { height: 120px; gap: 2px; }
  .x-dl { grid-template-columns: 1fr; gap: 2px; }
  .x-dl dd { margin-bottom: 8px; }
  .x-li { grid-template-columns: minmax(0, 1fr) 1fr auto; }
}

/* v2: range picker, line charts, cohorts, services */
#ttx .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#ttx .x-range select { width: auto; height: 32px; padding: 0 30px 0 12px; font-size: 13px; font-weight: 600; border-radius: 8px; }
.x-title .row { gap: 8px; }
.x-line { position: relative; height: 170px; }
.x-line svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.x-line-max { position: absolute; top: -2px; left: 0; z-index: 1; }
.x-line-hit { position: absolute; inset: 0; display: flex; }
.x-line-hit .x-bar { height: 100%; }
.x-line-hit .x-bar:hover { background: rgba(34,224,107,0.06); }
#ttx table.x-cohort td, #ttx table.x-cohort th { padding: 8px 10px; }
#ttx table.x-cohort td.num { border-left: 2px solid var(--bg); font-weight: 600; }
.x-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.x-svc { display: flex; gap: 10px; align-items: flex-start; }
.x-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; }
.x-dot.ok { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.x-dot.bad { background: var(--warn); box-shadow: 0 0 0 3px rgba(245,192,78,0.15); }

/* ---------- v3: livelier look ---------- */
:root { --cyan: #38d6f5; --violet: #a78bfa; --amber: #f5c04e; --red: #ff6b6b; }
.x-head { box-shadow: 0 1px 0 rgba(34,224,107,0.08), 0 10px 40px -20px rgba(34,224,107,0.35); }
.x-tabs a { position: relative; transition: color .15s; }
.x-tabs a.on { border-bottom-color: transparent; }
.x-tabs a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: x-grow .35s ease-out; }

/* icons + accents */
.x-ico { width: 16px; height: 16px; flex: none; }
.x-kpi { position: relative; overflow: hidden; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.x-kpi:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: 0 14px 30px -18px rgba(0,0,0,.8); }
.x-kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--k, var(--accent)), transparent 70%); opacity: .8; }
.x-kpi .l { display: flex; align-items: center; gap: 8px; }
.x-ico-wrap { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: var(--k, var(--accent)); background: color-mix(in srgb, var(--k, var(--accent)) 14%, transparent); }
.x-ico-wrap .x-ico { width: 15px; height: 15px; }
.acc-g { --k: #22e06b; } .acc-c { --k: var(--cyan); } .acc-v { --k: var(--violet); } .acc-a { --k: var(--amber); } .acc-r { --k: var(--red); }
.x-kpi.big { background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--k, var(--accent)) 16%, transparent), var(--surface) 60%); }
.x-chip { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 750; }
.x-chip.up { color: var(--accent); background: var(--accent-soft); }
.x-chip.dn { color: var(--red); background: rgba(255,107,107,0.12); }

/* hero */
.x-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.4fr) minmax(0, .55fr); gap: 22px; align-items: stretch; padding: 24px; border-radius: 20px; border: 1px solid #1f4430;
  background: radial-gradient(80% 140% at 0% 0%, rgba(34,224,107,0.20), transparent 55%), radial-gradient(60% 120% at 100% 100%, rgba(56,214,245,0.10), transparent 60%), var(--surface);
  box-shadow: 0 30px 80px -40px rgba(34,224,107,0.45), inset 0 1px 0 rgba(255,255,255,0.04); margin-bottom: 14px; position: relative; overflow: hidden; }
.x-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.05) 45%, transparent 60%); transform: translateX(-100%); animation: x-shine 6s ease-in-out 1s infinite; pointer-events: none; }
.x-hero-l { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 650; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.x-hero-l .x-ico { color: var(--accent); }
.x-hero-v { font-size: 46px; font-weight: 850; letter-spacing: -0.03em; color: #fff; line-height: 1.1; margin-top: 8px; font-variant-numeric: tabular-nums; text-shadow: 0 0 30px rgba(34,224,107,0.35); }
.x-hero-v.sm { font-size: 30px; margin: 0; text-shadow: none; }
.x-hero-sub { color: var(--muted); margin-top: 4px; }
.x-goal { margin-top: 20px; }
.x-goal-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 7px; }
.x-goal-track { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; }
.x-goal-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #16a34a, #22e06b 60%, #86efac); box-shadow: 0 0 16px rgba(34,224,107,.6); transform-origin: left; animation: x-scalex 1.1s cubic-bezier(.2,.8,.2,1) both; min-width: 6px; }
.x-hero-chart .x-line { height: 150px; }
.x-hero-side { display: grid; gap: 10px; align-content: center; }
.x-live-now { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,0.25); border: 1px solid var(--border); }
.x-mini { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px; border-radius: 12px; background: rgba(0,0,0,0.2); border: 1px solid var(--border); }
.x-mini b { font-size: 20px; color: #fff; font-variant-numeric: tabular-nums; } .x-mini span { color: var(--faint); font-size: 12.5px; }
.x-pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--faint); flex: none; position: relative; }
.x-pulse.on { background: var(--accent); }
.x-pulse.on::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); animation: x-ping 1.8s ease-out infinite; }
.x-livepill { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px 1px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.x-livepill i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: x-blink 1.6s ease-in-out infinite; }

/* highlight ribbon */
.x-ribbon { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.x-rib { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  animation: x-up .5s ease-out both; }
.x-rib .x-ico { color: var(--k); width: 15px; height: 15px; }
.x-rib b { color: #fff; }
.x-rib:nth-child(2) { animation-delay: .06s } .x-rib:nth-child(3) { animation-delay: .12s } .x-rib:nth-child(4) { animation-delay: .18s } .x-rib:nth-child(5) { animation-delay: .24s } .x-rib:nth-child(6) { animation-delay: .3s }

/* live feed */
.x-live { list-style: none; margin: 0; padding: 0; max-height: 270px; overflow: auto; scrollbar-width: thin; }
.x-live li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--border); font-size: 13px; }
.x-live li:last-child { border-bottom: 0; }
.x-live li.fresh { animation: x-flash 2.4s ease-out; }
.x-live-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--k); background: color-mix(in srgb, var(--k) 14%, transparent); }
.x-live-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-feed-empty { display: grid; place-items: center; text-align: center; gap: 8px; padding: 34px 10px; color: var(--faint); }
.x-feed-empty .x-ico { width: 30px; height: 30px; color: var(--accent); animation: x-blink 2s ease-in-out infinite; }
.x-feed-empty p { margin: 0; max-width: 300px; font-size: 13px; }

/* charts */
.x-bar span { background: linear-gradient(180deg, #4ade80, #16a34a); transform-origin: bottom; animation: x-scaley .6s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 14ms); }
.x-bar.peak span { background: linear-gradient(180deg, #bbf7d0, #22e06b); box-shadow: 0 0 14px rgba(34,224,107,.6); }
.x-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: x-draw 1.3s ease-out .1s forwards; }
.x-fill { transform-origin: left; animation: x-scalex .9s cubic-bezier(.2,.8,.2,1) both; background: linear-gradient(90deg, #16a34a, #22e06b); }
.x-step:nth-child(2) .x-fill { animation-delay: .06s } .x-step:nth-child(3) .x-fill { animation-delay: .12s } .x-step:nth-child(4) .x-fill { animation-delay: .18s }
.x-step:nth-child(5) .x-fill { animation-delay: .24s } .x-step:nth-child(6) .x-fill { animation-delay: .3s } .x-step:nth-child(7) .x-fill { animation-delay: .36s }

/* entrance */
.x-main > .x-kpis > *, .x-main > .x-grid2 > *, .x-main > .x-grid-h > *, .x-main > .x-sec, .x-hero { animation: x-up .5s ease-out both; }
.x-main > .x-kpis > :nth-child(2) { animation-delay: .04s } .x-main > .x-kpis > :nth-child(3) { animation-delay: .08s } .x-main > .x-kpis > :nth-child(4) { animation-delay: .12s }
.x-main > .x-kpis > :nth-child(5) { animation-delay: .16s } .x-main > .x-kpis > :nth-child(n+6) { animation-delay: .2s }
.x-main > .x-grid2 > *, .x-main > .x-grid-h > * { animation-delay: .15s }
.x-card { transition: border-color .2s; } .x-card:hover { border-color: var(--border-2); }

@keyframes x-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes x-scaley { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes x-scalex { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes x-draw { to { stroke-dashoffset: 0; } }
@keyframes x-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes x-ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes x-blink { 50% { opacity: .35; } }
@keyframes x-shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes x-flash { 0% { background: rgba(34,224,107,.22); } 100% { background: transparent; } }

@media (max-width: 1000px) {
  .x-hero { grid-template-columns: minmax(0, 1fr); }
  .x-hero-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .x-hero { padding: 18px; }
  .x-hero-v { font-size: 36px; }
  .x-hero-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .x-live-now { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  #ttx *, #ttx *::before, #ttx *::after { animation: none !important; transition: none !important; }
  .x-draw { stroke-dashoffset: 0; }
}

/* ---------- world map ---------- */
.x-mapcard { margin-top: 16px; padding-bottom: 14px; }
.x-mapcard .x-card-head h2 { display: flex; align-items: center; gap: 8px; }
.x-mapcard .x-card-head h2 .x-ico { color: var(--accent); }
.x-map { position: relative; border-radius: 14px; overflow: hidden; background: radial-gradient(70% 90% at 50% 40%, rgba(34,224,107,0.07), transparent 70%), #07100b; border: 1px solid var(--border); min-height: 200px; }
.x-map-svg { display: block; width: 100%; height: auto; }
.x-sphere { fill: #08130d; }
.x-grat { fill: none; stroke: rgba(255,255,255,0.035); stroke-width: .6; }
.x-country { stroke: #050a07; stroke-width: .5; transition: filter .15s, fill .4s; }
.x-country:hover { filter: brightness(1.5); stroke: rgba(255,255,255,.35); }
.x-dot-g { cursor: default; animation: x-pop .6s cubic-bezier(.2,1.4,.4,1) both; animation-delay: var(--d); transform-box: fill-box; transform-origin: center; }
.x-ring { fill: none; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: x-ring 2.4s ease-out infinite; animation-delay: var(--d); }
.x-tip { position: absolute; z-index: 3; pointer-events: none; min-width: 160px; padding: 8px 11px; border-radius: 10px; background: rgba(0,0,0,0.88); border: 1px solid var(--border-2); font-size: 12.5px; line-height: 1.5; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.x-tip b { color: #fff; display: block; margin-bottom: 2px; }
.x-map-empty { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,.7); border: 1px solid var(--border-2); color: var(--muted); font-size: 13px; white-space: nowrap; }
.x-map-empty .x-ico { color: var(--accent); animation: x-blink 2s ease-in-out infinite; }
.x-map-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; }
.x-map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg-fill { background: color-mix(in srgb, var(--accent) 60%, #0e1c15); } .lg-dot { border-radius: 50% !important; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.x-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #07100b; border: 1px solid var(--border); gap: 2px; }
.x-seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 650; padding: 5px 12px; border-radius: 7px; cursor: pointer; }
.x-seg button.on { color: #03140a; background: var(--k); box-shadow: 0 0 14px color-mix(in srgb, var(--k) 50%, transparent); }
.x-flag { margin-right: 8px; font-size: 15px; }
@keyframes x-pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes x-ring { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
@media (max-width: 640px) { .x-mapcard .x-card-head { flex-wrap: wrap; } .x-map-empty { white-space: normal; width: 90%; } }
.x-led { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 5px; vertical-align: 1px; box-shadow: 0 0 6px var(--accent); animation: x-blink 1.8s ease-in-out infinite; }
#x-asearch { max-width: 560px; }
#x-asearch input[name="q"] { flex: 1 1 200px; min-width: 160px; }
#x-asearch .x-psel { flex: 0 0 170px; width: 170px; }

/* ---------- v5: search, alerts, risk, support, goals, views ---------- */
.x-kbtn { gap: 6px; }
.x-kbtn .x-ico { width: 14px; height: 14px; color: var(--violet); }
.x-kbtn kbd { font: 600 10.5px/1 Inter, sans-serif; padding: 3px 5px; border-radius: 5px; border: 1px solid var(--border-2); color: var(--faint); }
@media (max-width: 760px) { .x-kbtn span, .x-kbtn kbd { display: none; } #x-alerts { display: none; } }
.x-pal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; animation: x-up .18s ease-out; }
.x-pal-box { width: 100%; max-width: 620px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border-2); box-shadow: 0 30px 90px rgba(0,0,0,.6), 0 0 0 1px rgba(34,224,107,.08); overflow: hidden; }
#ttx .x-pal-box input { height: 54px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; font-size: 16px; padding: 0 18px; background: transparent; box-shadow: none; }
.x-pal-res { max-height: 50vh; overflow: auto; padding: 6px; }
.x-pal-res a { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; text-decoration: none; }
.x-pal-res a .x-ico { color: var(--accent); }
.x-pal-res a.on, .x-pal-res a:hover { background: var(--accent-soft); }
.x-pal-res a span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-pal-foot { padding: 8px 14px; border-top: 1px solid var(--border); }
.x-toasts { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); }
.x-toast { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: #0b1912; border: 1px solid rgba(34,224,107,.4); box-shadow: 0 16px 40px rgba(0,0,0,.55), 0 0 24px rgba(34,224,107,.15); text-decoration: none; font-size: 13px; animation: x-up .3s ease-out; }
.x-toast b { color: #fff; }
.x-meter { height: 4px; border-radius: 4px; background: rgba(255,255,255,.07); margin-top: 6px; width: 90px; overflow: hidden; }
.x-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--amber) 50%, var(--accent)); background-size: 90px 100%; }
.x-ring-score { --p: 50; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(closest-side, var(--surface) 76%, transparent 78% 100%), conic-gradient(var(--rc, var(--accent)) calc(var(--p) * 1%), rgba(255,255,255,.08) 0); }
.x-ring-score b { font-size: 22px; color: #fff; }
.x-actions { display: grid; gap: 8px; justify-items: start; }
.x-thread { display: grid; gap: 10px; max-height: 420px; overflow: auto; }
.x-msgb { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); max-width: 92%; }
.x-msgb.me { margin-left: auto; background: var(--accent-soft); border-color: rgba(34,224,107,.3); }
.x-msgt { white-space: pre-wrap; margin-top: 4px; }
#ttx textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-2); background: #07100b; color: var(--text); font: inherit; outline: none; resize: vertical; }
#ttx textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.x-tlist { display: grid; gap: 6px; max-height: 520px; overflow: auto; }
.x-titem { display: grid; gap: 3px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); text-decoration: none; }
.x-titem:hover, .x-titem.on { border-color: var(--accent); background: var(--accent-soft); }
.x-proj { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.x-proj > div { display: grid; gap: 2px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.x-proj b { font-size: 22px; color: #fff; }
.x-details summary { cursor: pointer; color: var(--accent); font-weight: 650; font-size: 13px; }
.x-views { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: -6px 0 14px; }
.x-view { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 11px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface); font-size: 13px; }
.x-view a { text-decoration: none; font-weight: 600; }
.x-view button { border: 0; background: transparent; color: var(--faint); cursor: pointer; padding: 2px 5px; border-radius: 6px; font-size: 12px; }
.x-view button:hover { color: var(--text); background: var(--surface-2); }
.x-view button.on { color: var(--accent); }

.x-titem .x-badge { justify-self: start; }
.x-subtabs { display: flex; gap: 6px; padding: 10px 0 12px; overflow-x: auto; scrollbar-width: none; }
.x-subtabs a { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 650; color: var(--muted); text-decoration: none; border: 1px solid var(--border); background: var(--surface); white-space: nowrap; }
.x-subtabs a:hover { color: var(--text); }
.x-subtabs a.on { color: #03140a; background: var(--accent); border-color: var(--accent); }
@media (max-width: 760px) { #ttx #x-alerts { display: none; } #ttx .x-kbtn { padding: 0 9px; } }
@media (max-width: 640px) { #ttx .x-logo-text { font-size: 16px; } .x-head-r { gap: 6px; } }
html, body { overflow-x: hidden; }
.x-integ { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 520px) { .x-integ { grid-template-columns: minmax(0, 1fr); } }
.x-field { display: grid; gap: 3px; padding: 12px; border-radius: 10px; background: rgba(0,0,0,.18); border: 1px solid var(--border); }
.x-keyform input { flex: 1; min-width: 0; }

/* v12: Today, period overlays, journey, stall, investor links */
#ttx .x-bar em { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(143,167,154,.14); border-top: 1.5px dashed rgba(143,167,154,.7); border-radius: 3px 3px 0 0; pointer-events: none; }
#ttx .x-bars.has-prev .x-bar span { position: relative; z-index: 1; width: 62%; margin: 0 auto; }
#ttx .x-legend { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
#ttx .x-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--accent); margin-left: 8px; }
#ttx .x-legend i.was { background: rgba(143,167,154,.25); border: 1.5px dashed rgba(143,167,154,.8); }
#ttx .x-legend i.was.dash { height: 0; width: 14px; border-width: 1.5px 0 0; background: none; border-radius: 0; }
#ttx .x-grid-h:has(> :only-child), #ttx .x-grid2:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
#ttx .x-grid-h:empty, #ttx .x-grid2:empty { display: none; }
#ttx .x-hidden-note { display: flex; align-items: center; gap: 6px; margin: 18px 0 0; }
#ttx .x-hidden-note .x-ico { width: 14px; height: 14px; }

#ttx .x-today-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 4px 0 16px; }
#ttx .x-today-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); text-decoration: none; transition: border-color .15s, transform .15s; }
#ttx .x-today-tile b { font-size: 28px; line-height: 1.1; color: var(--faint); font-weight: 800; }
#ttx .x-today-tile span { font-size: 13px; }
#ttx .x-today-tile:hover { border-color: var(--border-2); transform: translateY(-1px); }
#ttx .x-today-tile.on { border-color: rgba(34,224,107,.45); background: linear-gradient(180deg, rgba(34,224,107,.10), var(--surface)); }
#ttx .x-today-tile.on b { color: var(--accent); }
#ttx .x-today-tile.bad { border-color: rgba(255,107,107,.45); background: linear-gradient(180deg, rgba(255,107,107,.10), var(--surface)); }
#ttx .x-today-tile.bad b { color: var(--neg); }
#ttx .x-allclear { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(34,224,107,.35); background: var(--accent-soft); margin-bottom: 16px; }
#ttx .x-allclear .x-ico { width: 22px; height: 22px; color: var(--accent); flex: none; }
#ttx .x-today-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; }
#ttx .x-today-grid > :only-child { grid-column: 1 / -1; }
#ttx .x-todo { list-style: none; margin: 0; padding: 0; }
#ttx .x-todo li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
#ttx .x-todo li:first-child { border-top: 0; padding-top: 0; }
#ttx .x-todo li > div { flex: 1; min-width: 0; }
#ttx .x-todo .btn { flex: none; }
#ttx .x-movers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
#ttx .x-movers > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
#ttx .x-movers b { font-size: 18px; }

#ttx .x-journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; counter-reset: s; }
#ttx .x-journey li { position: relative; display: flex; flex-direction: column; gap: 4px; padding-top: 34px; font-size: 13px; min-width: 0; }
#ttx .x-journey li::before { content: ""; position: absolute; top: 13px; left: 28px; right: -8px; height: 2px; background: var(--border-2); }
#ttx .x-journey li:last-child::before { display: none; }
#ttx .x-journey li.done::before { background: var(--accent); }
#ttx .x-journey .dot { position: absolute; top: 0; left: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--surface-2); border: 1.5px solid var(--border-2); color: var(--faint); }
#ttx .x-journey li.done .dot { background: var(--accent); border-color: var(--accent); color: #03140a; }
#ttx .x-journey li.next .dot { border-color: var(--warn); color: var(--warn); box-shadow: 0 0 0 4px rgba(245,192,78,.15); }
#ttx .x-journey li.todo b { color: var(--faint); font-weight: 600; }

#ttx .x-stall { display: flex; flex-direction: column; gap: 10px; }
#ttx .x-stall-row { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(0, 2fr) 90px 120px; gap: 14px; align-items: center; padding: 6px 8px; border-radius: 10px; }
#ttx .x-stall-row.worst { background: rgba(255,107,107,.07); outline: 1px solid rgba(255,107,107,.3); }
#ttx .x-stall-l { display: flex; flex-direction: column; min-width: 0; }
#ttx .x-stall-row .num { text-align: right; }

@media (max-width: 760px) {
  #ttx .x-today-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #ttx .x-today-tile b { font-size: 24px; }
  #ttx .x-today-grid { grid-template-columns: minmax(0, 1fr); }
  #ttx .x-journey { grid-template-columns: minmax(0, 1fr); gap: 0; }
  #ttx .x-journey li { padding: 4px 0 14px 40px; min-height: 40px; }
  #ttx .x-journey li::before { top: 30px; bottom: -2px; left: 13px; right: auto; width: 2px; height: auto; }
  #ttx .x-stall-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  #ttx .x-stall-row .x-track { grid-column: 1 / -1; order: 3; }
}
