/* WealthTrack palette — graphite base + multi-hue accents (no bank yellow / CBA gold) */
:root,
[data-theme="dark"] {
  --wt-bg: #090a0e;
  --wt-bg-elevated: #0e1016;
  --wt-surface: #14161e;
  --wt-surface-2: #1a1d28;
  --wt-ink: #e8e9f0;
  --wt-muted: #8b90a0;
  --wt-border: rgba(255, 255, 255, 0.07);
  --wt-border-strong: rgba(255, 255, 255, 0.13);
  /* Primary accent — soft indigo (links, active nav, CTAs) */
  --wt-forest: #5b8def;
  --wt-forest-deep: #3b6fd4;
  --wt-forest-light: rgba(91, 141, 239, 0.14);
  /* Secondary accents — distinct hues for metrics, charts, badges */
  --wt-copper: #d4a574;
  --wt-copper-soft: rgba(212, 165, 116, 0.14);
  --wt-cyan: #4ecdc4;
  --wt-violet: #a78bfa;
  --wt-rose: #e8a0b0;
  --wt-amber: #e0b86a;
  --wt-blue: #5b8def;
  --wt-ok: #34d399;
  --wt-warn: #f0b429;
  --wt-error: #f87171;
  --wt-input-bg: #0c0d12;
  --wt-radius: 8px;
  --wt-radius-sm: 6px;
  --wt-font: system-ui, "Segoe UI", -apple-system, sans-serif;
  --wt-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 8px 28px rgba(0, 0, 0, 0.4);
  --wt-shadow-sm: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 2px 10px rgba(0, 0, 0, 0.28);
  --wt-glow: 0 0 40px rgba(78, 205, 196, 0.08), 0 0 80px rgba(167, 139, 250, 0.06);
  /* Multi-hue energy band: teal → indigo → violet → rose */
  --wt-spectrum: linear-gradient(
    90deg,
    #4ecdc4 0%,
    #5b8def 38%,
    #a78bfa 72%,
    #e8a0b0 100%
  );
  --wt-spectrum-soft: linear-gradient(
    135deg,
    rgba(78, 205, 196, 0.12),
    rgba(91, 141, 239, 0.08),
    rgba(167, 139, 250, 0.06),
    transparent 70%
  );
  color-scheme: dark;
}

[data-theme="light"] {
  --wt-bg: #eef0f4;
  --wt-bg-elevated: #f5f6f9;
  --wt-surface: #fafbfc;
  --wt-surface-2: #e8eaf0;
  --wt-ink: #1a1c24;
  --wt-muted: #5c6270;
  --wt-border: rgba(26, 28, 36, 0.1);
  --wt-border-strong: rgba(26, 28, 36, 0.16);
  --wt-forest: #3b6fd4;
  --wt-forest-deep: #2b5ab8;
  --wt-forest-light: rgba(59, 111, 212, 0.1);
  --wt-copper: #b8864e;
  --wt-copper-soft: rgba(184, 134, 78, 0.12);
  --wt-cyan: #0d9488;
  --wt-violet: #7c5cbf;
  --wt-rose: #c06b7e;
  --wt-amber: #b8923a;
  --wt-blue: #3b6fd4;
  --wt-ok: #059669;
  --wt-warn: #b45309;
  --wt-error: #dc2626;
  --wt-input-bg: #fff;
  --wt-shadow: 0 1px 2px rgba(26, 28, 36, 0.04), 0 8px 24px rgba(26, 28, 36, 0.06);
  --wt-shadow-sm: 0 1px 3px rgba(26, 28, 36, 0.05);
  --wt-glow: 0 0 36px rgba(13, 148, 136, 0.06), 0 0 64px rgba(124, 92, 191, 0.04);
  --wt-spectrum: linear-gradient(
    90deg,
    #0d9488 0%,
    #3b6fd4 38%,
    #7c5cbf 72%,
    #c06b7e 100%
  );
  --wt-spectrum-soft: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.08),
    rgba(59, 111, 212, 0.06),
    rgba(124, 92, 191, 0.04),
    transparent 70%
  );
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.wt-app {
  font-family: var(--wt-font);
  background: var(--wt-bg);
  color: var(--wt-ink);
  min-height: 100vh;
  line-height: 1.55;
  background-image:
    radial-gradient(ellipse 70% 45% at 35% -12%, rgba(78, 205, 196, 0.07), transparent 55%),
    radial-gradient(ellipse 50% 40% at 95% 5%, rgba(167, 139, 250, 0.06), transparent 50%),
    radial-gradient(ellipse 40% 30% at 10% 90%, rgba(91, 141, 239, 0.04), transparent 50%);
  background-attachment: fixed;
}

[data-theme="light"] body.wt-app {
  background-image:
    radial-gradient(ellipse 70% 45% at 35% -12%, rgba(13, 148, 136, 0.05), transparent 55%),
    radial-gradient(ellipse 50% 40% at 95% 5%, rgba(124, 92, 191, 0.04), transparent 50%),
    radial-gradient(ellipse 40% 30% at 10% 90%, rgba(59, 111, 212, 0.03), transparent 50%);
}

/* Colorful spectrum strip — OpenRouter-style energy band */
.wt-spectrum-band {
  height: 3px;
  width: 100%;
  background: var(--wt-spectrum);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 60;
}

/* ═══════════════════════════════════════════════════════════
   App shell — left sidebar + top bar (OpenRouter / fintech)
   ═══════════════════════════════════════════════════════════ */

body.wt-shell {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

.wt-shell-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
}

/* —— Sidebar —— */
.wt-sidebar {
  --wt-sidebar-w: 248px;
  width: var(--wt-sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--wt-bg-elevated);
  border-right: 1px solid var(--wt-border);
  z-index: 40;
  transition: width 0.18s ease, transform 0.2s ease;
}

.wt-sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 0.85rem 0.75rem 1rem;
  border-bottom: 1px solid var(--wt-border);
  min-height: 56px;
}

.wt-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--wt-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  min-width: 0;
}

.wt-sidebar-logo:hover { color: var(--wt-ink); opacity: 0.92; }

.wt-sidebar-wordmark { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wt-sidebar-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--wt-border);
  background: transparent;
  color: var(--wt-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.wt-sidebar-collapse svg {
  transition: transform 0.18s ease;
}

/* Collapsed rail: chevron points right to re-expand */
body.wt-sidebar-collapsed .wt-sidebar-collapse svg {
  transform: scaleX(-1);
}

.wt-sidebar-collapse:hover {
  color: var(--wt-ink);
  border-color: var(--wt-border-strong);
  background: var(--wt-surface);
}

.wt-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.65rem 0.55rem 1rem;
  scrollbar-width: thin;
}

.wt-nav-group { margin-bottom: 0.35rem; }

.wt-nav-group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.4rem 0.55rem;
  border: none;
  background: transparent;
  color: var(--wt-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 6px;
}

.wt-nav-group-label:hover { color: var(--wt-ink); }

.wt-nav-chevron {
  transition: transform 0.15s ease;
  opacity: 0.7;
}

.wt-nav-group.is-open .wt-nav-chevron { transform: rotate(0deg); }
.wt-nav-group:not(.is-open) .wt-nav-chevron { transform: rotate(-90deg); }
.wt-nav-group:not(.is-open) .wt-nav-items { display: none; }

.wt-nav-items {
  list-style: none;
  margin: 0.1rem 0 0.35rem;
  padding: 0;
}

.wt-nav-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.65rem;
  border-radius: 9px;
  color: var(--wt-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
  border: 1px solid transparent;
}

.wt-nav-link:hover {
  color: var(--wt-ink);
  background: rgba(91, 141, 239, 0.08);
  text-decoration: none;
}

[data-theme="light"] .wt-nav-link:hover {
  background: rgba(59, 111, 212, 0.07);
}

.wt-nav-link.is-active {
  color: var(--wt-ink);
  background: var(--wt-forest-light);
  border-color: rgba(91, 141, 239, 0.28);
  box-shadow: inset 3px 0 0 var(--wt-forest);
}

.wt-nav-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--wt-muted);
  opacity: 1;
}
.wt-nav-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wt-nav-link.is-active .wt-nav-icon {
  color: var(--wt-forest);
}

.wt-nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wt-nav-external {
  margin-left: auto;
  font-size: 0.72rem;
  opacity: 0.55;
  flex-shrink: 0;
}

.wt-sidebar-footer {
  padding: 0.55rem;
  border-top: 1px solid var(--wt-border);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.wt-nav-footer-link { font-size: 0.82rem; }
.wt-nav-admin-link {
  color: var(--wt-forest);
  font-weight: 600;
}
.wt-nav-admin-link:hover { color: var(--wt-ink); }

/* Suite hub link — shared Webservices.org brand across products */
.wt-suite-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding: 0.48rem 0.65rem;
  border-radius: 9px;
  color: var(--wt-muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.wt-suite-link img {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  flex-shrink: 0;
}
.wt-suite-link:hover {
  color: var(--wt-ink);
  background: rgba(46, 197, 255, 0.08);
  border-color: rgba(46, 197, 255, 0.2);
  text-decoration: none;
}

/* Collapsed sidebar (desktop) */
body.wt-sidebar-collapsed .wt-sidebar { width: 64px; }
body.wt-sidebar-collapsed .wt-sidebar-wordmark,
body.wt-sidebar-collapsed .wt-nav-group-label span,
body.wt-sidebar-collapsed .wt-nav-text,
body.wt-sidebar-collapsed .wt-nav-chevron,
body.wt-sidebar-collapsed .wt-nav-external,
body.wt-sidebar-collapsed .wt-suite-link .wt-nav-text { display: none; }
body.wt-sidebar-collapsed .wt-sidebar-brand { padding: 0.85rem 0.5rem; justify-content: center; flex-wrap: wrap; gap: 0.35rem; }
body.wt-sidebar-collapsed .wt-sidebar-logo { justify-content: center; }
body.wt-sidebar-collapsed .wt-nav-link { justify-content: center; padding: 0.55rem; }
body.wt-sidebar-collapsed .wt-nav-group-label { justify-content: center; padding: 0.35rem; font-size: 0; }
body.wt-sidebar-collapsed .wt-nav-group-label::before {
  content: "·";
  font-size: 0.9rem;
  color: var(--wt-muted);
}

/* —— Main column —— */
.wt-shell-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.wt-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.55rem 1.15rem;
  min-height: 56px;
  background: rgba(14, 16, 23, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--wt-border);
  flex-shrink: 0;
  z-index: 30;
}

[data-theme="light"] .wt-topbar {
  background: rgba(250, 251, 252, 0.9);
}

.wt-topbar-left,
.wt-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.wt-topbar-right { flex-wrap: wrap; justify-content: flex-end; }

.wt-topbar-menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--wt-border);
  background: var(--wt-surface);
  color: var(--wt-ink);
  cursor: pointer;
}

.wt-top-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 140px;
  max-width: 420px;
}

.wt-top-search-icon {
  position: absolute;
  left: 0.7rem;
  color: var(--wt-muted);
  pointer-events: none;
}

.wt-top-search input[type="search"] {
  width: 100%;
  padding: 0.5rem 2.25rem 0.5rem 2.15rem;
  border-radius: 10px;
  border: 1px solid var(--wt-border);
  background: var(--wt-surface);
  color: var(--wt-ink);
  font-size: 0.88rem;
  font-family: inherit;
}

.wt-top-search input[type="search"]:focus {
  outline: none;
  border-color: rgba(139, 144, 168, 0.45);
  box-shadow: 0 0 0 3px rgba(139, 144, 168, 0.12);
}

.wt-top-search input[type="search"]::-webkit-search-cancel-button { appearance: none; }

.wt-search-kbd {
  position: absolute;
  right: 0.55rem;
  font-size: 0.68rem;
  font-family: inherit;
  color: var(--wt-muted);
  border: 1px solid var(--wt-border);
  border-radius: 5px;
  padding: 0.1rem 0.35rem;
  background: var(--wt-bg);
  pointer-events: none;
}

.wt-topbar-context {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.wt-top-select {
  appearance: none;
  background: var(--wt-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b93a7' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.55rem center;
  border: 1px solid var(--wt-border);
  color: var(--wt-ink);
  padding: 0.4rem 1.6rem 0.4rem 0.65rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: inherit;
  max-width: 160px;
  cursor: pointer;
}

.wt-top-select:hover { border-color: var(--wt-border-strong); }
.wt-top-select:focus {
  outline: none;
  border-color: rgba(139, 144, 168, 0.45);
}

.wt-top-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: 9px;
  border: 1px solid var(--wt-border);
  background: var(--wt-surface);
  color: var(--wt-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}

.wt-top-icon-btn:hover {
  color: var(--wt-ink);
  border-color: var(--wt-border-strong);
  text-decoration: none;
}

.wt-top-icon-btn.is-active {
  color: var(--wt-forest);
  border-color: rgba(139, 144, 168, 0.35);
  background: var(--wt-forest-light);
}

/* Profile dropdown */
.wt-profile { position: relative; }

.wt-profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.45rem 0.25rem 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--wt-border);
  background: var(--wt-surface);
  color: var(--wt-ink);
  cursor: pointer;
  font-family: inherit;
  max-width: 220px;
}

.wt-profile-trigger:hover {
  border-color: var(--wt-border-strong);
}

.wt-profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--wt-forest-deep), var(--wt-cyan));
  color: #f4f6fb;
  flex-shrink: 0;
}

.wt-profile-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.15;
}

.wt-profile-name {
  font-size: 0.8rem;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wt-profile-hint {
  font-size: 0.65rem;
  color: var(--wt-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wt-profile-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 200px;
  padding: 0.4rem;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border-strong);
  border-radius: 12px;
  box-shadow: var(--wt-shadow);
  z-index: 50;
}

.wt-profile-menu a,
.wt-profile-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--wt-ink);
  font-size: 0.88rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}

.wt-profile-menu a:hover,
.wt-profile-menu button:hover {
  background: var(--wt-forest-light);
  color: var(--wt-forest);
  text-decoration: none;
}

.wt-profile-divider {
  height: 1px;
  background: var(--wt-border);
  margin: 0.3rem 0.35rem;
}

.wt-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 35;
}

/* Shell main content scrolls */
body.wt-shell .wt-main {
  flex: 1;
  overflow-y: auto;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 1.5rem 1.75rem 2.5rem;
}

body.wt-shell .wt-demo-banner {
  flex-shrink: 0;
}

/* Mobile shell */
@media (max-width: 900px) {
  .wt-topbar-menu { display: inline-flex; }

  .wt-sidebar {
    position: fixed;
    top: 3px;
    left: 0;
    bottom: 0;
    transform: translateX(-105%);
    box-shadow: var(--wt-shadow);
  }

  body.wt-sidebar-open .wt-sidebar { transform: translateX(0); }
  body.wt-sidebar-open .wt-sidebar-backdrop { display: block; }

  body.wt-sidebar-collapsed .wt-sidebar { width: var(--wt-sidebar-w); }
  body.wt-sidebar-collapsed .wt-sidebar-wordmark,
  body.wt-sidebar-collapsed .wt-nav-group-label span,
  body.wt-sidebar-collapsed .wt-nav-text,
  body.wt-sidebar-collapsed .wt-nav-chevron { display: initial; }
  body.wt-sidebar-collapsed .wt-nav-group-label span { display: inline; }
  body.wt-sidebar-collapsed .wt-nav-group-label { font-size: 0.68rem; justify-content: space-between; }
  body.wt-sidebar-collapsed .wt-nav-group-label::before { content: none; }
  body.wt-sidebar-collapsed .wt-nav-link { justify-content: flex-start; padding: 0.48rem 0.65rem; }

  .wt-profile-meta { display: none; }
  .wt-top-icon-label { display: none; }
  .wt-search-kbd { display: none; }
  .wt-top-select { max-width: 120px; }
  body.wt-shell .wt-main { padding: 1.15rem 1rem 2rem; }
}

@media (max-width: 560px) {
  .wt-topbar-context { display: none; }
  .wt-top-search { max-width: none; }
}

/* Legacy top command bar (unused by shell, kept for safety) */
.wt-command {
  background: rgba(14, 16, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--wt-ink);
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--wt-border);
}

[data-theme="light"] .wt-command {
  background: rgba(255, 252, 248, 0.92);
}

.wt-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.wt-logo,
.wt-brand-mark {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.wt-logo { height: 32px; width: auto; }

.wt-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.wt-logo-hero {
  height: 52px;
  width: auto;
  margin-bottom: 0.5rem;
}

.wt-brand a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
}

.wt-brand a:hover { opacity: 0.92; }

.wt-command-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.wt-command select,
.wt-command input {
  background: var(--wt-surface-2);
  border: 1px solid var(--wt-border-strong);
  color: var(--wt-ink);
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

.wt-command select:hover,
.wt-command input:hover {
  border-color: rgba(139, 144, 168, 0.35);
}

.wt-command select option { color: var(--wt-ink); background: var(--wt-surface); }

.wt-command-user {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.75rem;
  font-size: 0.85rem;
}

.wt-user-name { font-weight: 500; }

.wt-command-user a,
.wt-command-user button {
  color: var(--wt-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  margin-left: 0.75rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.wt-command-user a:hover,
.wt-command-user button:hover {
  color: var(--wt-forest);
}

.wt-demo-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.25rem;
  padding: 0.65rem 1.5rem;
  background: linear-gradient(
    90deg,
    rgba(78, 205, 196, 0.1),
    rgba(91, 141, 239, 0.1),
    rgba(167, 139, 250, 0.08)
  );
  color: var(--wt-ink);
  font-size: 0.88rem;
  border-bottom: 1px solid var(--wt-border);
}

.wt-demo-banner a {
  color: var(--wt-cyan);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wt-demo-banner a:hover { color: var(--wt-forest); }

.wt-demo-actions { white-space: nowrap; }

.wt-zones {
  background: rgba(19, 21, 30, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--wt-border);
  padding: 0 1.5rem;
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
}

[data-theme="light"] .wt-zones {
  background: rgba(255, 252, 248, 0.9);
}

.wt-zone {
  display: inline-block;
  padding: 0.9rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--wt-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.wt-zone:hover { color: var(--wt-ink); }

.wt-zone.active {
  color: var(--wt-ink);
  border-bottom-color: var(--wt-forest);
  font-weight: 600;
  background: linear-gradient(180deg, transparent, rgba(91, 141, 239, 0.08));
  box-shadow: inset 0 -2px 0 0 var(--wt-forest);
}

.wt-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 2.5rem;
}

.wt-page-head { margin-bottom: 1.35rem; }

.wt-page-head h1 {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--wt-ink);
}

.wt-page-head .lede {
  color: var(--wt-muted);
  font-size: 0.92rem;
  margin-top: 0.2rem;
}

.wt-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.35rem;
}

.wt-metric {
  position: relative;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  padding: 1.05rem 1.1rem 1.05rem 1.15rem;
  box-shadow: var(--wt-shadow-sm);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.wt-metric::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--wt-metric-accent, var(--wt-cyan));
  box-shadow: 0 0 12px var(--wt-metric-accent, var(--wt-cyan));
}

.wt-metric:nth-child(6n + 1) { --wt-metric-accent: var(--wt-cyan); }
.wt-metric:nth-child(6n + 2) { --wt-metric-accent: var(--wt-violet); }
.wt-metric:nth-child(6n + 3) { --wt-metric-accent: var(--wt-rose); }
.wt-metric:nth-child(6n + 4) { --wt-metric-accent: var(--wt-amber); }
.wt-metric:nth-child(6n + 5) { --wt-metric-accent: var(--wt-copper); }
.wt-metric:nth-child(6n + 6) { --wt-metric-accent: var(--wt-forest); }

.wt-metric:hover {
  border-color: var(--wt-border-strong);
  transform: translateY(-1px);
}

.wt-metric .label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wt-muted);
  font-weight: 600;
}

.wt-metric .value {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  margin-top: 0.35rem;
  color: var(--wt-ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  word-break: break-word;
}

.wt-panel {
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--wt-shadow-sm);
}

.wt-panel-head {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--wt-border);
  font-weight: 600;
  font-size: 0.92rem;
  background: var(--wt-bg-elevated);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.wt-panel-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--wt-forest);
  text-decoration: none;
}
.wt-panel-link:hover { text-decoration: underline; }

.wt-panel-body { padding: 1rem 1.15rem; }

/* Admin-like metric strip */
.wt-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.wt-stat {
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius-sm);
  padding: 0.9rem 1rem;
}
.wt-stat .label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wt-muted);
  font-weight: 600;
}
.wt-stat .value {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.wt-stat .value.wt-neg { color: var(--wt-error); }

.wt-plain-list {
  list-style: disc;
  padding-left: 1.2rem;
  color: var(--wt-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}
.wt-plain-list strong { color: var(--wt-ink); }
.wt-plain-list li + li { margin-top: 0.35rem; }

.wt-inline-form { display: inline; }

/* Modal dialog */
body.wt-modal-open { overflow: hidden; }
.wt-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.wt-modal[hidden] { display: none !important; }
.wt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.wt-modal-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border-strong);
  border-radius: var(--wt-radius);
  box-shadow: var(--wt-shadow);
}
.wt-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--wt-border);
}
.wt-modal-head h2 {
  font-size: 1.05rem;
  font-weight: 600;
}
.wt-modal-close {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--wt-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
}
.wt-modal-close:hover { color: var(--wt-ink); }
.wt-modal-body { padding: 1.1rem 1.15rem 1.25rem; }
.wt-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 0.25rem;
}

table.wt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

table.wt-table th,
table.wt-table td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--wt-border);
}

table.wt-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wt-muted);
  background: var(--wt-bg-elevated);
}

table.wt-table tbody tr {
  transition: background 0.12s ease;
}

table.wt-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] table.wt-table tbody tr:hover {
  background: rgba(15, 118, 110, 0.04);
}

table.wt-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

table.wt-table a.sym {
  font-weight: 600;
  color: var(--wt-cyan);
  text-decoration: none;
}

table.wt-table a.sym:hover {
  color: var(--wt-forest);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wt-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, var(--wt-forest-deep), var(--wt-forest));
  color: #f4f6fb;
  border: none;
  padding: 0.55rem 1.05rem;
  border-radius: var(--wt-radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(91, 141, 239, 0.25), 0 4px 16px rgba(59, 111, 212, 0.28);
  transition: filter 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.wt-btn:hover {
  filter: brightness(1.1);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(91, 141, 239, 0.35), 0 6px 20px rgba(78, 205, 196, 0.15);
}

[data-theme="light"] .wt-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--wt-forest-deep), var(--wt-forest));
  box-shadow: 0 2px 10px rgba(59, 111, 212, 0.25);
}

[data-theme="light"] .wt-btn:hover { color: #fff; }

.wt-btn-ghost {
  background: var(--wt-forest-light);
  color: var(--wt-forest);
  box-shadow: none;
  border: 1px solid rgba(91, 141, 239, 0.28);
}

.wt-btn-ghost:hover {
  color: var(--wt-ink);
  background: rgba(91, 141, 239, 0.16);
  filter: none;
}

.wt-btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.wt-btn-danger:hover { color: #fff; filter: brightness(1.08); }

.wt-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wt-badge-ok {
  background: rgba(139, 144, 168, 0.15);
  color: var(--wt-ok);
  border: 1px solid rgba(139, 144, 168, 0.25);
}
.wt-badge-warn {
  background: rgba(154, 149, 144, 0.14);
  color: var(--wt-warn);
  border: 1px solid rgba(154, 149, 144, 0.25);
}
.wt-badge-error {
  background: rgba(196, 135, 135, 0.14);
  color: var(--wt-error);
  border: 1px solid rgba(196, 135, 135, 0.25);
}

[data-theme="light"] .wt-badge-ok { background: #d1fae5; border-color: #a7f3d0; }
[data-theme="light"] .wt-badge-warn { background: #fef3c7; border-color: #fde68a; }
[data-theme="light"] .wt-badge-error { background: #fee2e2; border-color: #fecaca; }

.wt-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.wt-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wt-panel .wt-checklist {
  padding: 0 1.15rem 0.35rem;
}

.wt-checklist li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--wt-border);
  font-size: 0.9rem;
}

.wt-readiness-row {
  align-items: flex-start;
  padding: 0.85rem 0;
}

.wt-readiness-body {
  flex: 1;
  min-width: 0;
}

.wt-readiness-body strong {
  display: block;
  font-size: 0.9rem;
  color: var(--wt-ink);
}

.wt-readiness-body p {
  font-size: 0.82rem;
  color: var(--wt-muted);
  margin: 0.2rem 0 0.35rem;
  line-height: 1.45;
}

.wt-readiness-body a {
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
}

.wt-readiness-body a:hover { text-decoration: underline; }

.wt-readiness-row .wt-badge {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.wt-workspace-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wt-workspace-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--wt-border);
}

.wt-workspace-list li a {
  font-weight: 500;
  color: var(--wt-cyan);
  text-decoration: none;
}

.wt-workspace-list li a:hover { text-decoration: underline; }

.wt-workspace-list li.active a { font-weight: 700; }

.wt-empty {
  text-align: center;
  padding: 3rem 2rem;
  border: 1px dashed var(--wt-border-strong);
  border-radius: var(--wt-radius);
  background:
    var(--wt-spectrum-soft),
    var(--wt-surface);
}

.wt-empty h2 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--wt-ink);
}

.wt-empty p {
  color: var(--wt-muted);
  max-width: 28rem;
  margin: 0 auto;
}

.wt-empty-form {
  margin-top: 1.15rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.wt-empty-form input[type="text"] {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--wt-border);
  border-radius: 8px;
  min-width: 200px;
  background: var(--wt-input-bg);
  color: var(--wt-ink);
}

.wt-muted-note {
  font-size: 0.85rem;
  color: var(--wt-muted);
  line-height: 1.45;
}

.wt-mono,
.wt-mono-block {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

.wt-mono-block {
  display: block;
  background: var(--wt-bg);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--wt-border);
  user-select: all;
  word-break: break-all;
  margin-top: 0.35rem;
}

.wt-table-nested {
  margin: 0.35rem 0 0.75rem;
  background: var(--wt-bg);
  border-radius: 8px;
  font-size: 0.88rem;
}

.wt-table-nested th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--wt-muted);
}

.wt-parcel-detail > td {
  padding-top: 0 !important;
  border-top: none !important;
  background: transparent;
}

.wt-badge-kind-buy { background: var(--wt-forest-light); color: var(--wt-ok); }
.wt-badge-kind-sell { background: var(--wt-copper-soft); color: var(--wt-copper); }
.wt-badge-kind-dividend,
.wt-badge-kind-drp { background: rgba(139, 144, 168, 0.14); color: var(--wt-blue); }
.wt-badge-kind-amit_attribution { background: rgba(167, 139, 250, 0.14); color: var(--wt-violet); }

[data-theme="light"] .wt-badge-kind-dividend,
[data-theme="light"] .wt-badge-kind-drp { background: #eef2ff; color: #4338ca; }
[data-theme="light"] .wt-badge-kind-amit_attribution { background: #f5f3ff; color: #6d28d9; }

.wt-ingest-result {
  border-left: 3px solid var(--wt-forest);
}

.wt-positive { color: var(--wt-ok); }

.wt-insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.wt-insight-card {
  position: relative;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  padding: 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  overflow: hidden;
  box-shadow: var(--wt-shadow-sm);
}

.wt-insight-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--wt-spectrum);
  opacity: 0.75;
}

.wt-insight-card:nth-child(5n + 1)::before { background: var(--wt-cyan); }
.wt-insight-card:nth-child(5n + 2)::before { background: var(--wt-violet); }
.wt-insight-card:nth-child(5n + 3)::before { background: var(--wt-rose); }
.wt-insight-card:nth-child(5n + 4)::before { background: var(--wt-amber); }
.wt-insight-card:nth-child(5n + 5)::before { background: var(--wt-forest); }

.wt-insight-card:hover {
  border-color: var(--wt-border-strong);
  box-shadow: var(--wt-shadow);
  transform: translateY(-2px);
}

.wt-insight-card h3 {
  font-size: 0.95rem;
  color: var(--wt-ink);
  margin-bottom: 0.35rem;
}

.wt-insight-card p {
  font-size: 0.82rem;
  color: var(--wt-muted);
}

.wt-support-chat {
  display: flex;
  flex-direction: column;
  max-width: 640px;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  overflow: hidden;
}

.wt-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.15rem;
  min-height: 280px;
  max-height: 420px;
  overflow-y: auto;
  background: var(--wt-bg);
}

.wt-chat-empty {
  margin: auto;
  text-align: center;
  color: var(--wt-muted);
  font-size: 0.9rem;
  max-width: 22rem;
}

.wt-chat-bubble {
  max-width: 88%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  font-size: 0.9rem;
}

.wt-chat-user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--wt-forest-deep), var(--wt-forest));
  color: #f4f6fb;
  border-bottom-right-radius: 4px;
}

.wt-chat-user .wt-chat-meta { color: rgba(255,255,255,0.75); }
.wt-chat-user .wt-chat-meta strong { color: #fff; }

.wt-chat-admin {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--wt-border);
  border-bottom-left-radius: 4px;
}

.wt-chat-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.72rem;
  color: var(--wt-muted);
  margin-bottom: 0.35rem;
}

.wt-chat-meta strong { color: var(--wt-forest); font-size: 0.75rem; }
.wt-chat-bubble p { margin: 0; white-space: pre-wrap; line-height: 1.45; }

.wt-chat-compose {
  padding: 1rem 1.15rem;
  border-top: 1px solid var(--wt-border);
  background: var(--wt-surface);
}

.wt-chat-compose textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--wt-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 4.5rem;
  background: var(--wt-input-bg);
  color: var(--wt-ink);
}

.wt-chat-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.65rem;
  gap: 0.75rem;
}

.wt-chat-status { font-size: 0.8rem; color: var(--wt-muted); }

.wt-positive { color: var(--wt-ok); font-weight: 600; }

.wt-allocation-bars { display: flex; flex-direction: column; gap: 0.55rem; }

.wt-alloc-row {
  display: grid;
  grid-template-columns: 4rem 1fr 3rem;
  gap: 0.65rem;
  align-items: center;
  font-size: 0.85rem;
}

.wt-alloc-label { font-weight: 600; color: var(--wt-ink); }
.wt-alloc-track { background: var(--wt-bg); border-radius: 999px; height: 8px; overflow: hidden; }
.wt-alloc-fill {
  background: var(--wt-spectrum);
  height: 100%;
  border-radius: 999px;
  min-width: 2px;
  box-shadow: none;
}
.wt-alloc-row:nth-child(6n + 1) .wt-alloc-fill { background: var(--wt-cyan); box-shadow: none; }
.wt-alloc-row:nth-child(6n + 2) .wt-alloc-fill { background: var(--wt-violet); box-shadow: none; }
.wt-alloc-row:nth-child(6n + 3) .wt-alloc-fill { background: var(--wt-rose); box-shadow: none; }
.wt-alloc-row:nth-child(6n + 4) .wt-alloc-fill { background: var(--wt-amber); box-shadow: none; }
.wt-alloc-row:nth-child(6n + 5) .wt-alloc-fill { background: var(--wt-forest); box-shadow: none; }
.wt-alloc-row:nth-child(6n + 6) .wt-alloc-fill { background: var(--wt-blue); box-shadow: none; }
.wt-alloc-pct { text-align: right; color: var(--wt-muted); font-variant-numeric: tabular-nums; }

.wt-field select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--wt-border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--wt-input-bg);
  color: var(--wt-ink);
}

.wt-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.wt-panel-danger {
  border-color: rgba(155, 34, 38, 0.25);
}

.wt-theme-toggle {
  display: inline-flex;
  border: 1px solid var(--wt-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--wt-bg);
}

.wt-theme-option {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.wt-theme-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wt-theme-option span {
  display: block;
  padding: 0.55rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--wt-muted);
}

.wt-theme-option.active span,
.wt-theme-option:has(input:checked) span {
  background: linear-gradient(135deg, var(--wt-forest-deep), var(--wt-forest));
  color: #f4f6fb;
}

[data-theme="light"] .wt-theme-option.active span,
[data-theme="light"] .wt-theme-option:has(input:checked) span {
  color: #fff;
}

.wt-chat-admin {
  background: var(--wt-surface);
  border-color: var(--wt-border);
}

.wt-alert-error {
  background: rgba(196, 135, 135, 0.12);
  border: 1px solid rgba(196, 135, 135, 0.28);
  color: var(--wt-error);
}
.wt-alert-success {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.28);
  color: var(--wt-ok);
}
.wt-alert-info {
  background: var(--wt-forest-light);
  border: 1px solid rgba(91, 141, 239, 0.28);
  color: var(--wt-forest);
}

@media (max-width: 768px) {
  .wt-grid-2 { grid-template-columns: 1fr; }
}

/* Public / auth pages */
body.wt-public {
  font-family: var(--wt-font);
  background: var(--wt-bg);
  color: var(--wt-ink);
  min-height: 100vh;
  line-height: 1.55;
  background-image:
    radial-gradient(ellipse 70% 45% at 15% -10%, rgba(78, 205, 196, 0.09), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(167, 139, 250, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 35% at 50% 100%, rgba(91, 141, 239, 0.05), transparent 55%);
  background-attachment: fixed;
}

body.wt-public a { color: var(--wt-cyan); text-decoration: none; }
body.wt-public a:hover { text-decoration: underline; color: var(--wt-forest); }

body.wt-public a.wt-btn,
body.wt-public a.wt-btn:hover {
  color: #eef0f4;
  text-decoration: none;
}

[data-theme="light"] body.wt-public a.wt-btn,
[data-theme="light"] body.wt-public a.wt-btn:hover {
  color: #fff;
}

body.wt-public a.wt-btn-ghost,
body.wt-public a.wt-btn-ghost:hover {
  color: var(--wt-forest);
  text-decoration: none;
}

body.wt-public a.wt-site-cta,
body.wt-public a.wt-site-cta:hover {
  color: #eef0f4 !important;
  text-decoration: none;
}

.wt-site-header {
  background: rgba(14, 16, 23, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--wt-ink);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--wt-border);
}

.wt-site-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.wt-site-header nav a {
  color: var(--wt-muted);
  margin-left: 1rem;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.wt-site-header nav a:hover { color: var(--wt-ink); text-decoration: none; }

.wt-site-cta {
  background: linear-gradient(135deg, var(--wt-forest-deep), var(--wt-forest)) !important;
  padding: 0.45rem 0.95rem !important;
  border-radius: 8px;
  color: #f4f6fb !important;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(91, 141, 239, 0.3), 0 4px 14px rgba(59, 111, 212, 0.22);
}

.wt-site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.wt-landing {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.wt-hero {
  margin: 0 -1.5rem 2.75rem;
  padding: 3.25rem 1.5rem 3.5rem;
  background:
    radial-gradient(ellipse 60% 50% at 85% 10%, rgba(167, 139, 250, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 45% at 10% 30%, rgba(78, 205, 196, 0.12), transparent 50%),
    radial-gradient(ellipse 40% 35% at 60% 90%, rgba(232, 160, 176, 0.08), transparent 50%),
    linear-gradient(180deg, rgba(14, 16, 23, 0.45) 0%, transparent 100%);
  border-bottom: 1px solid var(--wt-border);
  position: relative;
}

.wt-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--wt-spectrum);
  opacity: 0.55;
}

.wt-hero-layout {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.wt-hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wt-cyan);
  margin-bottom: 0.75rem;
}

.wt-hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--wt-ink);
  margin-bottom: 1rem;
}

.wt-hero-lead {
  font-size: 1.08rem;
  color: var(--wt-muted);
  max-width: 34rem;
  margin: 0 0 1.6rem;
  line-height: 1.55;
}

.wt-hero-auth {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 320px;
}

.wt-hero-signin {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--wt-muted);
}

.wt-hero-signin a { font-weight: 600; }

/* Mock portfolio card */
.wt-hero-panel { display: flex; justify-content: center; }

.wt-mock {
  width: 100%;
  max-width: 340px;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: 18px;
  padding: 1.15rem 1.25rem 1.25rem;
  box-shadow: var(--wt-shadow), var(--wt-glow);
  position: relative;
  overflow: hidden;
}

.wt-mock::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--wt-spectrum);
}

.wt-mock-bar {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.wt-mock-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wt-border);
}

.wt-mock-bar span:first-child { background: var(--wt-rose); }
.wt-mock-bar span:nth-child(2) { background: var(--wt-amber); }
.wt-mock-bar span:nth-child(3) { background: var(--wt-forest); }

.wt-mock-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wt-muted);
  margin-bottom: 0.75rem;
}

.wt-mock-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--wt-ink);
  border-bottom: 1px solid var(--wt-border);
}

.wt-mock-row .up { color: var(--wt-ok); font-size: 0.88rem; }

.wt-mock-divider { height: 0.65rem; }

.wt-mock-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.35rem 0;
  font-size: 0.88rem;
}

.wt-mock-metric .lbl { color: var(--wt-muted); }
.wt-mock-metric .val { font-weight: 700; color: var(--wt-cyan); }

.wt-mock-chip {
  display: inline-block;
  margin-top: 0.85rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--wt-forest-light);
  color: var(--wt-forest);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(139, 144, 168, 0.25);
}

.wt-how {
  margin-bottom: 2.75rem;
}

.wt-how h2 {
  text-align: center;
  font-size: 1.55rem;
  color: var(--wt-ink);
  margin-bottom: 1.35rem;
  letter-spacing: -0.025em;
}

.wt-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 0;
  margin: 0;
}

.wt-steps li {
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  padding: 1.3rem 1.2rem;
  box-shadow: var(--wt-shadow-sm);
  position: relative;
  overflow: hidden;
}

.wt-steps li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.wt-steps li:nth-child(1)::before { background: var(--wt-cyan); }
.wt-steps li:nth-child(2)::before { background: var(--wt-violet); }
.wt-steps li:nth-child(3)::before { background: var(--wt-rose); }

.wt-steps strong {
  display: block;
  color: var(--wt-ink);
  font-size: 1.02rem;
  margin-bottom: 0.4rem;
}

.wt-steps p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--wt-muted);
  line-height: 1.5;
}

.wt-cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 320px;
  margin: 0 auto;
}

.wt-cta-row .wt-btn-google-hero,
.wt-cta-row .wt-btn {
  width: 100%;
  justify-content: center;
}

.wt-hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.wt-btn-google-hero,
.wt-btn-facebook-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.8rem 1.1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  border: 1px solid var(--wt-border);
  box-shadow: 0 1px 2px rgba(44, 41, 38, 0.06);
}

.wt-btn-google-hero {
  background: #fff;
  color: #3c4043 !important;
  border-color: #dadce0;
}

.wt-btn-google-hero:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 6px rgba(44, 41, 38, 0.1);
  text-decoration: none !important;
}

.wt-btn-facebook-hero {
  background: #1877f2;
  color: #fff !important;
  border-color: #1877f2;
}

.wt-btn-facebook-hero:hover {
  filter: brightness(1.05);
  color: #fff !important;
  text-decoration: none !important;
}

.wt-btn-hero-primary {
  width: 100%;
  justify-content: center;
  padding: 0.8rem 1.1rem;
  border-radius: 10px;
  font-size: 0.95rem;
}

.wt-btn-hero-secondary {
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1.1rem;
  border-radius: 10px;
}

.wt-g-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
}

.wt-hero-fine,
.wt-hero-oauth-hint {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--wt-muted);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.45;
}

.wt-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.wt-feature-card {
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  padding: 1.4rem 1.3rem;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  box-shadow: var(--wt-shadow-sm);
  position: relative;
  overflow: hidden;
}

.wt-feature-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--wt-cyan);
  opacity: 0.85;
}

.wt-feature-card:nth-child(4n + 1)::after { background: var(--wt-cyan); }
.wt-feature-card:nth-child(4n + 2)::after { background: var(--wt-violet); }
.wt-feature-card:nth-child(4n + 3)::after { background: var(--wt-rose); }
.wt-feature-card:nth-child(4n + 4)::after { background: var(--wt-amber); }

.wt-feature-card:hover {
  border-color: var(--wt-border-strong);
  box-shadow: var(--wt-shadow);
  transform: translateY(-2px);
}

.wt-feature-icon {
  font-size: 1.35rem;
  margin-bottom: 0.55rem;
  line-height: 1;
}

.wt-feature-card h3 {
  font-size: 1rem;
  color: var(--wt-ink);
  margin-bottom: 0.45rem;
}

.wt-feature-card p {
  font-size: 0.88rem;
  color: var(--wt-muted);
  line-height: 1.5;
}

.wt-landing-cta {
  text-align: center;
  background:
    var(--wt-spectrum-soft),
    linear-gradient(160deg, #13151e 0%, #0e1017 100%);
  color: var(--wt-ink);
  border-radius: calc(var(--wt-radius) + 4px);
  padding: 2.4rem 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--wt-border);
  box-shadow: var(--wt-shadow);
  position: relative;
  overflow: hidden;
}

.wt-landing-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--wt-spectrum);
}

.wt-landing-cta h2 {
  font-size: 1.45rem;
  color: var(--wt-ink);
  margin-bottom: 0.4rem;
}

.wt-landing-cta p {
  color: var(--wt-muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.wt-landing-cta .wt-btn:not(.wt-btn-google-hero) {
  background: linear-gradient(135deg, var(--wt-forest-deep), var(--wt-forest));
  border-color: transparent;
}

.wt-landing-cta .wt-btn:not(.wt-btn-google-hero):hover {
  filter: brightness(1.08);
}

.wt-site-footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2rem;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--wt-muted);
  border-top: 1px solid var(--wt-border);
}

.wt-site-footer a { color: var(--wt-muted); }
.wt-site-footer a:hover { color: var(--wt-forest); }

@media (max-width: 860px) {
  .wt-hero-layout { grid-template-columns: 1fr; text-align: center; }
  .wt-hero-lead { margin-left: auto; margin-right: auto; }
  .wt-hero-auth { margin: 0 auto; }
  .wt-steps { grid-template-columns: 1fr; }
  .wt-hero-panel { order: -1; }
  .wt-mock { max-width: 300px; }
}

@media (max-width: 700px) {
  .wt-site-header nav a:not(.wt-site-cta) { display: none; }
}

.wt-auth-shell {
  min-height: calc(100vh - 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.wt-auth-card {
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: calc(var(--wt-radius) + 2px);
  padding: 2.1rem;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--wt-shadow), var(--wt-glow);
  position: relative;
  overflow: hidden;
}

.wt-auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--wt-spectrum);
}

.wt-disclaimer {
  margin: 1rem 0;
  border: 1px solid var(--wt-border);
  border-radius: 8px;
  background: var(--wt-bg);
  overflow: hidden;
}

.wt-disclaimer-inline { margin-top: 1rem; }

.wt-disclaimer-title {
  padding: 0.55rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wt-muted);
  border-bottom: 1px solid var(--wt-border);
  background: var(--wt-surface);
}

.wt-disclaimer-body {
  padding: 0.75rem 0.85rem;
  max-height: 11rem;
  overflow-y: auto;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--wt-muted);
}

.wt-disclaimer-body p + p { margin-top: 0.55rem; }

.wt-disclaimer-body strong { color: var(--wt-ink); font-weight: 600; }

.wt-disclaimer-accept { margin-top: 0.75rem; }

.wt-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--wt-ink);
  cursor: pointer;
}

.wt-checkbox-label input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: auto;
}

.wt-auth-brand {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.25rem;
  text-decoration: none;
}

.wt-auth-card h1 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--wt-ink);
  margin-bottom: 0.25rem;
}

.wt-auth-sub {
  color: var(--wt-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

.wt-field { margin-bottom: 1rem; }

.wt-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wt-muted);
  margin-bottom: 0.35rem;
}

.wt-field input,
.wt-field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--wt-border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--wt-input-bg);
  color: var(--wt-ink);
}

.wt-field input:focus {
  outline: none;
  border-color: rgba(139, 144, 168, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 144, 168, 0.15);
}

.wt-btn-block { width: 100%; justify-content: center; }

.wt-form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}

.wt-form-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--wt-muted);
}

.wt-alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Help */
.wt-help-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  font-size: 0.88rem;
}

.wt-help-nav a {
  color: var(--wt-forest);
  text-decoration: none;
  font-weight: 500;
}

.wt-help-nav a:hover { text-decoration: underline; }

.wt-help-section { margin-bottom: 1.25rem; scroll-margin-top: 5rem; }

.wt-help-prose p,
.wt-help-steps p,
.wt-help-faq p {
  font-size: 0.92rem;
  color: var(--wt-muted);
  line-height: 1.6;
  margin-top: 0.35rem;
}

.wt-help-prose p:first-child { margin-top: 0; }

.wt-help-prose strong,
.wt-help-steps strong { color: var(--wt-ink); }

.wt-help-prose code,
.wt-help-faq code {
  font-size: 0.85em;
  background: var(--wt-bg);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--wt-border);
}

.wt-help-note {
  margin-top: 1rem !important;
  padding: 0.75rem 1rem;
  background: var(--wt-forest-light);
  border-radius: 8px;
  border-left: 3px solid var(--wt-forest);
  color: var(--wt-ink) !important;
}

[data-theme="dark"] .wt-help-note {
  background: var(--wt-forest-light);
  color: var(--wt-ink) !important;
}

.wt-help-steps {
  list-style: none;
  counter-reset: help-step;
  margin: 0;
  padding: 0;
}

.wt-help-steps > li {
  counter-increment: help-step;
  padding: 1rem 0 1rem 2.75rem;
  border-bottom: 1px solid var(--wt-border);
  position: relative;
}

.wt-help-steps > li:last-child { border-bottom: none; }

.wt-help-steps > li::before {
  content: counter(help-step);
  position: absolute;
  left: 0;
  top: 1rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--wt-forest);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wt-help-steps ul {
  margin: 0.5rem 0 0 1.1rem;
  font-size: 0.9rem;
  color: var(--wt-muted);
}

.wt-help-steps a { color: var(--wt-forest); }

.wt-help-glossary h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wt-muted);
  margin: 1.5rem 0 0.65rem;
}

.wt-help-glossary h3:first-child { margin-top: 0; }

.wt-glossary-table { margin-bottom: 0.5rem; }

.wt-glossary-table td:first-child {
  font-weight: 600;
  color: var(--wt-ink);
  width: 28%;
  vertical-align: top;
}

.wt-help-faq { display: flex; flex-direction: column; gap: 0.5rem; }

.wt-faq-item {
  border: 1px solid var(--wt-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--wt-bg);
}

.wt-faq-item summary {
  padding: 0.85rem 1rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.wt-faq-item summary::-webkit-details-marker { display: none; }

.wt-faq-item summary::after {
  content: "+";
  font-size: 1.1rem;
  color: var(--wt-muted);
  font-weight: 400;
}

.wt-faq-item[open] summary::after { content: "−"; }

.wt-faq-item[open] summary {
  border-bottom: 1px solid var(--wt-border);
  background: var(--wt-surface);
}

.wt-faq-item p {
  padding: 0.85rem 1rem 1rem;
  margin: 0;
}

.wt-faq-item a { color: var(--wt-forest); }
/* Social auth */
.wt-social-auth { margin-bottom: 0.25rem; }
.wt-social-divider {
  display: flex; align-items: center; gap: 0.75rem;
  color: var(--wt-muted); font-size: 0.8rem; margin-bottom: 0.9rem;
}
.wt-social-divider::before, .wt-social-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--wt-border);
}
.wt-social-buttons { display: flex; flex-direction: column; gap: 0.55rem; }
.wt-btn-social {
  display: flex; align-items: center; justify-content: center; gap: 0.55rem;
  width: 100%; padding: 0.7rem 1rem; border-radius: 10px;
  border: 1px solid var(--wt-border-strong); background: var(--wt-surface-2);
  color: var(--wt-ink); text-decoration: none; font-weight: 600; font-size: 0.9rem;
  box-shadow: var(--wt-shadow-sm);
}
.wt-btn-social:hover {
  border-color: rgba(139, 144, 168, 0.35); background: var(--wt-bg-elevated); color: var(--wt-ink); text-decoration: none;
}
.wt-social-icon {
  width: 1.35rem; height: 1.35rem; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}
.wt-btn-google { border-color: #dadce0; }
.wt-btn-facebook {
  background: #1877f2; border-color: #1877f2; color: #fff;
}
.wt-btn-facebook:hover { filter: brightness(1.05); color: #fff; background: #1877f2; }
.wt-btn-facebook .wt-social-icon { background: transparent; color: #fff; }

body.wt-public a.wt-btn-google-hero,
body.wt-public a.wt-btn-google-hero:hover { color: #3c4043 !important; }
body.wt-public a.wt-btn-facebook-hero,
body.wt-public a.wt-btn-facebook-hero:hover { color: #fff !important; }
body.wt-public a.wt-btn-social { color: var(--wt-ink); }
body.wt-public a.wt-btn-facebook { color: #fff; }

/* Google buttons stay light for brand recognition */
.wt-btn-google-hero,
.wt-btn-google {
  background: #fff !important;
  color: #3c4043 !important;
  border-color: #dadce0 !important;
}

[data-theme="dark"] .wt-btn-google-hero:hover,
[data-theme="dark"] .wt-btn-google:hover {
  background: #f8f9fa !important;
}

/* ═══════════════════════════════════════════════════════════
   v3 product surfaces — simple, bright, intentional
   ═══════════════════════════════════════════════════════════ */

.wt-pos { color: var(--wt-ok) !important; font-weight: 600; }
.wt-neg { color: var(--wt-error) !important; font-weight: 600; }
.wt-flat { color: var(--wt-muted); }

/* Page header with actions */
.wt-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  margin-bottom: 1.35rem;
}
.wt-page-head-text { min-width: 0; flex: 1; }
.wt-page-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.wt-page-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wt-cyan);
  margin-bottom: 0.25rem;
}

/* Hero portfolio strip */
.wt-hero-metrics {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.wt-hero-primary {
  position: relative;
  background:
    radial-gradient(ellipse 80% 80% at 100% 0%, rgba(78, 205, 196, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 70% at 0% 100%, rgba(167, 139, 250, 0.1), transparent 50%),
    var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: calc(var(--wt-radius) + 2px);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--wt-shadow-sm);
  overflow: hidden;
}
.wt-hero-primary::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--wt-spectrum);
}
.wt-hero-primary .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wt-muted);
  font-weight: 700;
}
.wt-hero-primary .value {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
  color: var(--wt-ink);
  line-height: 1.15;
}
.wt-hero-primary .sub {
  margin-top: 0.55rem;
  font-size: 0.88rem;
  color: var(--wt-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  align-items: center;
}
.wt-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--wt-forest-light);
  color: var(--wt-forest);
  border: 1px solid rgba(139, 144, 168, 0.25);
}
.wt-hero-chip.neg {
  background: rgba(196, 135, 135, 0.12);
  color: var(--wt-error);
  border-color: rgba(196, 135, 135, 0.28);
}

/* Destination / action cards */
.wt-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.wt-action-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.05rem;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--wt-shadow-sm);
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  position: relative;
  overflow: hidden;
  min-height: 96px;
}
.wt-action-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--wt-card-accent, var(--wt-cyan));
}
.wt-action-card:nth-child(6n+1) { --wt-card-accent: var(--wt-cyan); }
.wt-action-card:nth-child(6n+2) { --wt-card-accent: var(--wt-violet); }
.wt-action-card:nth-child(6n+3) { --wt-card-accent: var(--wt-rose); }
.wt-action-card:nth-child(6n+4) { --wt-card-accent: var(--wt-amber); }
.wt-action-card:nth-child(6n+5) { --wt-card-accent: var(--wt-forest); }
.wt-action-card:nth-child(6n+6) { --wt-card-accent: var(--wt-blue); }
.wt-action-card:hover {
  transform: translateY(-2px);
  border-color: var(--wt-border-strong);
  box-shadow: var(--wt-shadow);
  text-decoration: none;
  color: inherit;
}
.wt-action-card strong {
  font-size: 0.95rem;
  color: var(--wt-ink);
}
.wt-action-card span {
  font-size: 0.8rem;
  color: var(--wt-muted);
  line-height: 1.4;
}
.wt-action-card .wt-action-arrow {
  margin-top: auto;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--wt-card-accent, var(--wt-cyan));
}

/* Report hub cards (Tax / Insights) */
.wt-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}
.wt-report-card {
  display: flex;
  flex-direction: column;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  padding: 1.15rem 1.2rem 1.1rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--wt-shadow-sm);
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
  position: relative;
  overflow: hidden;
  min-height: 140px;
}
.wt-report-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--wt-card-accent, var(--wt-spectrum));
}
.wt-report-card:nth-child(5n+1) { --wt-card-accent: var(--wt-cyan); }
.wt-report-card:nth-child(5n+2) { --wt-card-accent: var(--wt-violet); }
.wt-report-card:nth-child(5n+3) { --wt-card-accent: var(--wt-rose); }
.wt-report-card:nth-child(5n+4) { --wt-card-accent: var(--wt-amber); }
.wt-report-card:nth-child(5n+5) { --wt-card-accent: var(--wt-forest); }
.wt-report-card:hover {
  transform: translateY(-2px);
  border-color: var(--wt-border-strong);
  box-shadow: var(--wt-shadow);
  text-decoration: none;
  color: inherit;
}
.wt-report-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--wt-ink);
  margin: 0.15rem 0 0.4rem;
}
.wt-report-card p {
  font-size: 0.84rem;
  color: var(--wt-muted);
  line-height: 1.45;
  margin: 0;
  flex: 1;
}
.wt-report-card .wt-report-meta {
  margin-top: 0.85rem;
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--wt-ink);
}
.wt-report-card .wt-report-go {
  margin-top: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--wt-card-accent, var(--wt-cyan));
}

/* Readiness progress */
.wt-readiness-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--wt-border);
}
.wt-readiness-score {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--wt-muted);
}
.wt-readiness-score strong { color: var(--wt-forest); }
.wt-progress {
  height: 6px;
  background: var(--wt-bg);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 1.15rem 0.5rem;
}
.wt-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--wt-forest), var(--wt-cyan));
  min-width: 2px;
}

/* Stacked allocation ribbon */
.wt-alloc-ribbon {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--wt-bg);
  margin-bottom: 0.85rem;
  box-shadow: inset 0 0 0 1px var(--wt-border);
}
.wt-alloc-ribbon span {
  display: block;
  height: 100%;
  min-width: 2px;
}
.wt-alloc-ribbon span:nth-child(6n+1) { background: var(--wt-cyan); }
.wt-alloc-ribbon span:nth-child(6n+2) { background: var(--wt-violet); }
.wt-alloc-ribbon span:nth-child(6n+3) { background: var(--wt-rose); }
.wt-alloc-ribbon span:nth-child(6n+4) { background: var(--wt-amber); }
.wt-alloc-ribbon span:nth-child(6n+5) { background: var(--wt-forest); }
.wt-alloc-ribbon span:nth-child(6n+6) { background: var(--wt-blue); }

.wt-alloc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  font-size: 0.78rem;
  color: var(--wt-muted);
  margin-bottom: 0.25rem;
}
.wt-alloc-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.3rem;
  vertical-align: middle;
}
.wt-alloc-legend span:nth-child(6n+1) i { background: var(--wt-cyan); }
.wt-alloc-legend span:nth-child(6n+2) i { background: var(--wt-violet); }
.wt-alloc-legend span:nth-child(6n+3) i { background: var(--wt-rose); }
.wt-alloc-legend span:nth-child(6n+4) i { background: var(--wt-amber); }
.wt-alloc-legend span:nth-child(6n+5) i { background: var(--wt-forest); }
.wt-alloc-legend span:nth-child(6n+6) i { background: var(--wt-blue); }

/* Inline weight bar in tables */
.wt-weight-cell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  justify-content: flex-end;
}
.wt-weight-bar {
  width: 48px;
  height: 6px;
  background: var(--wt-bg);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.wt-weight-bar > i {
  display: block;
  height: 100%;
  background: var(--wt-spectrum);
  border-radius: 999px;
  min-width: 2px;
}

/* Toolbar above tables */
.wt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}
.wt-toolbar-left, .wt-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.wt-filter-input {
  padding: 0.45rem 0.75rem;
  border-radius: 9px;
  border: 1px solid var(--wt-border);
  background: var(--wt-surface);
  color: var(--wt-ink);
  font-size: 0.88rem;
  font-family: inherit;
  min-width: 180px;
}
.wt-filter-input:focus {
  outline: none;
  border-color: rgba(139, 144, 168, 0.45);
  box-shadow: 0 0 0 3px rgba(139, 144, 168, 0.12);
}

/* Decomposition bars (returns) */
.wt-decomp {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.25rem 0;
}
.wt-decomp-row {
  display: grid;
  grid-template-columns: 8rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.9rem;
}
.wt-decomp-label { color: var(--wt-muted); font-weight: 500; }
.wt-decomp-track {
  height: 10px;
  background: var(--wt-bg);
  border-radius: 999px;
  overflow: hidden;
}
.wt-decomp-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 2px;
}
.wt-decomp-fill.capital { background: var(--wt-violet); }
.wt-decomp-fill.income { background: var(--wt-forest); }
.wt-decomp-fill.fx { background: var(--wt-amber); }
.wt-decomp-fill.total { background: var(--wt-spectrum); }
.wt-decomp-val {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 5.5rem;
  text-align: right;
}

/* Upload drop zone */
.wt-dropzone {
  border: 1.5px dashed var(--wt-border-strong);
  border-radius: var(--wt-radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(139, 144, 168, 0.04), transparent);
  margin-bottom: 1rem;
}
.wt-dropzone strong { display: block; margin-bottom: 0.35rem; color: var(--wt-ink); }
.wt-dropzone p { color: var(--wt-muted); font-size: 0.88rem; margin: 0; }

/* Steps for import */
.wt-steps-h {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.wt-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  color: var(--wt-muted);
}
.wt-step-pill .n {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--wt-surface-2);
  font-size: 0.72rem;
}
.wt-step-pill.is-active {
  color: var(--wt-ink);
  border-color: rgba(139, 144, 168, 0.35);
  background: var(--wt-forest-light);
}
.wt-step-pill.is-active .n {
  background: var(--wt-forest);
  color: #eef0f4;
}

/* Compact stat list in panels */
.wt-stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.wt-stat-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--wt-border);
  font-size: 0.9rem;
}
.wt-stat-list li:last-child { border-bottom: none; }
.wt-stat-list .lbl { color: var(--wt-muted); }
.wt-stat-list .val {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Holding row hover cue */
table.wt-table tbody tr[data-href] { cursor: pointer; }

/* Section title inside content */
.wt-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--wt-muted);
  margin: 0 0 0.75rem;
}

@media (max-width: 700px) {
  .wt-hero-metrics { grid-template-columns: 1fr 1fr; }
  .wt-hero-primary { grid-column: 1 / -1; }
  .wt-decomp-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .wt-decomp-val { text-align: left; }
}

/* ── Help tips (inline “i” explainer) ─────────────────────────────── */
.wt-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-left: 0.28rem;
  border-radius: 999px;
  border: 1px solid var(--wt-border-strong);
  background: var(--wt-surface-2);
  color: var(--wt-muted);
  font-size: 0.65rem;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  vertical-align: middle;
  cursor: help;
  position: relative;
  top: -0.05em;
  flex-shrink: 0;
}
.wt-help:hover,
.wt-help:focus {
  color: var(--wt-ink);
  border-color: var(--wt-forest);
  outline: none;
  background: var(--wt-forest-light);
}
.wt-help::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 40;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(20rem, 70vw);
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: #12141c;
  color: #e8e9f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  font-size: 0.75rem;
  font-weight: 450;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.4;
  white-space: normal;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}
.wt-help:hover::after,
.wt-help:focus::after,
.wt-help:focus-visible::after {
  opacity: 1;
  visibility: visible;
}
[data-theme="light"] .wt-help::after {
  background: #1a1c24;
  color: #f5f6f9;
}

/* ── Capital gains / lot tables ───────────────────────────────────── */
.wt-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table.wt-table-cgt,
table.wt-table-lots {
  table-layout: fixed;
  width: 100%;
  min-width: 36rem;
}
table.wt-table-cgt .col-sym { width: 5.5rem; }
table.wt-table-cgt .col-date { width: 7rem; }
table.wt-table-cgt .col-num { width: 7.25rem; }
table.wt-table-cgt .col-days { width: 5rem; }
table.wt-table-cgt .col-lots { width: 4rem; }
table.wt-table-lots .col-lot { width: 42%; }
table.wt-table-lots .col-date { width: 7rem; }
table.wt-table-lots .col-num-sm { width: 6.5rem; }
table.wt-table-lots .col-days { width: 4.5rem; }
table.wt-table-lots .col-disc { width: 7.5rem; }

table.wt-table-cgt th,
table.wt-table-cgt td,
table.wt-table-lots th,
table.wt-table-lots td {
  padding: 0.55rem 0.65rem;
  vertical-align: top;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.wt-table-cgt th .wt-help,
table.wt-table-lots th .wt-help {
  text-transform: none;
  letter-spacing: 0;
}

.wt-nowrap { white-space: nowrap; }
.wt-lot-cell {
  max-width: 100%;
}
.wt-lot-label {
  font-weight: 600;
  color: var(--wt-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wt-lot-detail {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--wt-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wt-disc-pill {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(139, 144, 160, 0.14);
  color: var(--wt-muted);
  white-space: nowrap;
}
.wt-disc-pill.is-yes {
  background: rgba(52, 211, 153, 0.14);
  color: var(--wt-ok);
}
.wt-panel-head-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch !important;
  gap: 0.2rem;
}
.wt-panel-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}
.wt-panel-sub {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 450;
  color: var(--wt-muted);
  text-transform: none;
  letter-spacing: 0;
}
.wt-cgt-panel .wt-panel-head {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
}
