/* Hub shell v3 (2026-09-25 PREVIEW): left sidebar + slim top bar. Desktop >900px.
   Phones keep the bottom tab bar (mobile-hub.css styles .hub-nav-links). */
html:has(.hub-v3-body) { overflow-y: scroll !important; scrollbar-gutter: stable !important; }
body.hub-v3-body { --hub-side: 248px; }

.hub-sidebar, .hub-sidebar *, .hub-header.hub-v3, .hub-header.hub-v3 * { box-sizing: border-box !important; }
.hub-sidebar a, .hub-sidebar button, .hub-header.hub-v3 a, .hub-header.hub-v3 button {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important; text-decoration: none !important; margin: 0 !important;
}

/* ---------- desktop ---------- */
@media (min-width: 901px) {
  body.hub-v3-body { padding-left: var(--hub-side) !important; }
  .hub-sidebar {
    position: fixed !important; top: 0; left: 0; bottom: 0; width: var(--hub-side); z-index: 1002;
    display: flex; flex-direction: column; padding: 18px 14px 16px;
    background: #0A0E15; border-right: 1px solid rgba(255,255,255,0.07);
    font-size: 16px; line-height: normal;
  }
  .hub-sidebar .hub-side-brand { display: flex !important; align-items: center; gap: 10px; height: 36px; padding: 0 10px !important; margin: 2px 0 30px !important; }
  .hub-side-brand img { width: 30px; height: 30px; border-radius: 50%; display: block; }
  .hub-side-brand span { font-family: "Space Grotesk", system-ui, sans-serif !important; font-size: 19px; font-weight: 750; letter-spacing: -0.02em; line-height: 1; color: #fff; }
  .hub-side-brand span b { color: #10B981; font-weight: 750; }
  .hub-side-label { margin: 0 0 8px; padding: 0 12px; font-family: "JetBrains Mono", monospace; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #64748B; }
  .hub-side-group + .hub-side-group { margin-top: 26px; }

  .hub-sidebar .hub-nav-links {
    position: static !important; transform: none !important; inset: auto !important;
    display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 2px !important;
    width: auto !important; height: auto !important; padding: 0 !important; margin: 0 !important;
    background: none !important; border: 0 !important; box-shadow: none !important;
  }
  .hub-sidebar .hub-nav-link, .hub-sidebar .hub-side-link {
    display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; gap: 12px !important;
    height: 40px !important; min-height: 0 !important; padding: 0 12px !important; border-radius: 10px !important; border: 0 !important;
    font-size: 14.5px !important; font-weight: 600 !important; line-height: 1 !important; letter-spacing: -0.01em !important;
    color: #94A3B8 !important; background: transparent !important; transition: background .12s ease, color .12s ease;
  }
  .hub-sidebar .hub-nav-link svg, .hub-sidebar .hub-side-link svg { width: 18px !important; height: 18px !important; flex-shrink: 0; }
  .hub-sidebar .hub-nav-link:hover, .hub-sidebar .hub-side-link:hover { background: rgba(255,255,255,0.04) !important; color: #F1F5F9 !important; }
  .hub-sidebar .hub-nav-link.active, .hub-sidebar .hub-side-link.active { background: rgba(16,185,129,0.1) !important; color: #FFFFFF !important; }
  .hub-sidebar .hub-nav-link.active svg, .hub-sidebar .hub-side-link.active svg { color: #10B981 !important; }
  .hub-side-foot { margin-top: auto; }
  .hub-side-foot .hub-side-link { color: #64748B !important; font-size: 13.5px !important; height: 36px !important; }

  .hub-header.hub-v3 {
    position: sticky !important; top: 0 !important; z-index: 1000 !important;
    height: 64px !important; min-height: 64px !important; max-height: 64px !important; width: 100% !important;
    display: flex !important; align-items: center !important; justify-content: space-between !important;
    padding: 0 32px !important; font-size: 16px !important; line-height: normal !important;
    background: rgba(13,16,22,0.92) !important; backdrop-filter: blur(14px) !important; -webkit-backdrop-filter: blur(14px) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  }
  .hub-v3 .hub-top-title { font-family: "Space Grotesk", system-ui, sans-serif; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: #fff; margin: 0; }
  .hub-v3 .hub-top-brand { display: none !important; }
}

/* ---------- shared: top bar right side + account menu ---------- */
.hub-v3 .hub-right-group { display: flex !important; align-items: center !important; gap: 10px !important; line-height: 1 !important; }
.hub-v3 .btn-discord-hub {
  display: inline-flex !important; align-items: center !important; gap: 8px !important; height: 38px !important; padding: 0 14px !important;
  border-radius: 11px !important; background: rgba(255,255,255,0.04) !important; border: 1px solid rgba(255,255,255,0.1) !important;
  color: #F1F5F9 !important; box-shadow: none !important; cursor: pointer !important;
  font-size: 13px !important; font-weight: 600 !important; line-height: 1 !important; letter-spacing: -0.01em !important;
}
.hub-v3 .btn-discord-hub svg { color: #7C86FF !important; fill: currentColor !important; }
.hub-v3 .btn-discord-hub:hover { background: rgba(88,101,242,0.12) !important; border-color: rgba(88,101,242,0.5) !important; }
.hub-v3 .user-menu-wrap { position: relative !important; }
.hub-v3 .user-menu-btn {
  display: inline-flex !important; align-items: center !important; gap: 9px !important; height: 38px !important; padding: 0 12px 0 5px !important;
  border-radius: 11px !important; background: rgba(255,255,255,0.04) !important; border: 1px solid rgba(255,255,255,0.1) !important;
  cursor: pointer !important; color: #F1F5F9 !important; font-size: 13.5px !important;
}
.hub-v3 .user-menu-btn img { width: 28px !important; height: 28px !important; min-width: 28px !important; min-height: 28px !important; border-radius: 8px !important; object-fit: cover !important; display: block !important; }
.hub-v3 .user-menu-name { font-size: 13.5px !important; font-weight: 600 !important; letter-spacing: -0.01em !important; color: #F1F5F9 !important; max-width: 110px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-v3 .user-menu-btn > svg path { stroke: #94A3B8 !important; }
.hub-v3 .user-dropdown {
  position: absolute !important; top: calc(100% + 10px) !important; right: 0 !important; left: auto !important; width: 272px !important;
  padding: 8px !important; border-radius: 16px !important; background: #111722 !important; border: 1px solid rgba(255,255,255,0.1) !important;
  box-shadow: 0 24px 50px rgba(0,0,0,0.6) !important; flex-direction: column !important; gap: 2px !important; z-index: 1003 !important;
  font-size: 14px !important; line-height: 1.3 !important;
}
.hub-v3 .user-dropdown:not(.show) { display: none !important; }
.hub-v3 .user-dropdown.show { display: flex !important; }
.hub-v3 .user-dropdown-header { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 10px !important; padding: 10px 10px 12px !important; margin-bottom: 4px !important; border-bottom: 1px solid rgba(255,255,255,0.07) !important; }
.hub-v3 .user-dropdown-name { font-size: 14px !important; font-weight: 700 !important; color: #F1F5F9 !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
.hub-v3 .user-dropdown-sep { display: none !important; }
.hub-v3 .user-dropdown-plan { flex-shrink: 0 !important; font-family: "JetBrains Mono", monospace !important; font-size: 10.5px !important; font-weight: 700 !important; letter-spacing: .06em !important; padding: 4px 8px !important; border-radius: 999px !important; color: #CBD5E1 !important; background: rgba(255,255,255,0.06) !important; border: 1px solid rgba(255,255,255,0.1) !important; }
.hub-v3 .user-dropdown-plan.plus, .hub-v3 .user-dropdown-plan.pro, .hub-v3 .user-dropdown-plan.vip { color: #10B981 !important; background: rgba(16,185,129,0.1) !important; border-color: rgba(16,185,129,0.35) !important; }
.hub-v3 .user-dropdown-item { display: flex !important; align-items: center !important; gap: 12px !important; width: 100% !important; padding: 9px 10px !important; border-radius: 10px !important; border: 0 !important; background: transparent !important; color: #F1F5F9 !important; text-align: left !important; cursor: pointer !important; }
.hub-v3 .user-dropdown-item:hover { background: rgba(255,255,255,0.05) !important; }
.hub-v3 .user-dropdown-item > svg { width: 32px !important; height: 32px !important; padding: 8px !important; flex-shrink: 0 !important; border-radius: 9px !important; background: rgba(255,255,255,0.05) !important; color: #10B981 !important; }
.hub-v3 .udi-text { display: flex !important; flex-direction: column !important; gap: 2px !important; min-width: 0 !important; }
.hub-v3 .udi-text strong { font-size: 13.5px !important; font-weight: 600 !important; color: #F1F5F9 !important; line-height: 1.2 !important; }
.hub-v3 .udi-text small { font-size: 12px !important; color: #94A3B8 !important; line-height: 1.3 !important; }
.hub-v3 .user-dropdown-divider { height: 1px !important; margin: 4px 6px !important; background: rgba(255,255,255,0.07) !important; }
.hub-v3 .user-dropdown-item.logout > svg { color: #F87171 !important; background: rgba(248,113,113,0.08) !important; }
.hub-v3 .user-dropdown-item.logout strong { color: #FCA5A5 !important; }

/* ---------- phones: sidebar dissolves; its main links become the bottom tab bar ---------- */
@media (max-width: 900px) {
  .hub-sidebar { display: contents !important; }
  .hub-side-brand, .hub-side-label, .hub-side-account, .hub-side-foot { display: none !important; }
  .hub-header.hub-v3 { display: flex !important; align-items: center !important; justify-content: space-between !important; height: 60px !important; padding: 0 16px !important; background: #0D1016 !important; border-bottom: 1px solid rgba(255,255,255,0.07) !important; position: sticky !important; top: 0 !important; z-index: 1000 !important; }
  .hub-v3 .hub-top-title { display: none !important; }
  .hub-v3 .hub-top-brand { display: flex !important; align-items: center; gap: 9px; }
  .hub-v3 .hub-top-brand img { width: 28px; height: 28px; border-radius: 50%; }
  .hub-v3 .hub-top-brand span { font-family: "Space Grotesk", system-ui, sans-serif !important; font-size: 18px; font-weight: 750; letter-spacing: -0.02em; color: #fff; }
  .hub-v3 .hub-top-brand span b { color: #10B981; }
  .hub-v3 .btn-discord-hub { display: none !important; }
  .hub-v3 .user-menu-name, .hub-v3 .user-menu-btn > svg { display: none !important; }
  .hub-v3 .user-menu-btn { padding: 0 5px !important; }
  .hub-v3 .user-dropdown { position: fixed !important; top: 62px !important; right: 12px !important; }
  .hub-sidebar .hub-nav-link { display: flex !important; align-items: center !important; color: #94A3B8 !important; font-weight: 600 !important; }
  .hub-sidebar .hub-nav-link.active { color: #fff !important; }
  .hub-sidebar .hub-nav-link.active svg { color: #10B981 !important; }
}

/* ---------- guides inside the shell: one sidebar only; topic list = "Browse guides" dropdown ---------- */
.hub-v3-body .guide-page .guide-layout, .hub-v3-body .guide-layout { display: block !important; max-width: 800px !important; margin-left: auto !important; margin-right: auto !important; padding-top: 28px !important; }
.hub-v3-body .guide-sidebar { position: static !important; max-height: none !important; margin: 0 0 28px !important; padding: 0 !important; overflow: visible !important; border: 1px solid rgba(255,255,255,0.08) !important; border-radius: 12px !important; background: rgba(255,255,255,0.03) !important; }
.hub-v3-body .guide-sidebar > summary { display: flex !important; align-items: center; justify-content: space-between; padding: 13px 16px; color: #cbd5e1; font-size: 14px; font-weight: 600; list-style: none; cursor: pointer; }
.hub-v3-body .guide-sidebar > summary::-webkit-details-marker { display: none; }
.hub-v3-body .guide-sidebar > summary::after { content: '+'; color: #64748B; }
.hub-v3-body .guide-sidebar[open] > summary::after { content: '−'; }
.hub-v3-body .guide-sidebar:not([open]) > .sidebar-content { display: none !important; }
.hub-v3-body .guide-sidebar > .sidebar-content { max-height: 55vh; padding: 16px !important; border-top: 1px solid rgba(255,255,255,0.08); overflow: auto; }
/* keep the sidebar pixel-identical on guide pages (their base p/line-height differ) */
@media (min-width: 901px) {
  .hub-sidebar { font-size: 16px !important; line-height: 1.2 !important; }
  .hub-sidebar p.hub-side-label { font-size: 10.5px !important; line-height: 14px !important; margin: 0 0 8px !important; padding: 0 12px !important; letter-spacing: .14em !important; }
  .hub-sidebar .hub-side-brand span { font-size: 19px !important; line-height: 1 !important; }
}

/* ---------- v3d: profile card, Support, Settings tabs, Profile page ---------- */
.hub-v3-body #ppAiTrigger { display: none !important; }
.hub-sidebar button.hub-side-link { width: 100% !important; background: transparent !important; border: 0 !important; cursor: pointer !important; text-align: left !important; }
.hub-v3 .hub-top-avatar { display: none !important; }
.hub-v3 .hub-top-avatar img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; display: block; background: #1e293b; }
@media (min-width: 901px) {
  .hub-side-foot { display: flex; flex-direction: column; gap: 8px; }
  .hub-sidebar .hub-profile-card {
    display: flex !important; align-items: center !important; gap: 10px !important; padding: 9px 10px !important; margin: 0 !important;
    border-radius: 12px !important; border: 1px solid rgba(255,255,255,0.08) !important; background: rgba(255,255,255,0.03) !important;
    color: #F1F5F9 !important; transition: background .12s ease, border-color .12s ease;
  }
  .hub-sidebar .hub-profile-card:hover, .hub-sidebar .hub-profile-card.active { background: rgba(255,255,255,0.06) !important; border-color: rgba(255,255,255,0.16) !important; }
  .hub-profile-card img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #1e293b; }
  .hub-profile-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
  .hub-profile-text .user-display-name { font-size: 13.5px; font-weight: 600; line-height: 1.1; color: #F1F5F9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hub-profile-text .user-dropdown-badge { align-self: flex-start; font-family: "JetBrains Mono", monospace; font-size: 9.5px; font-weight: 700; letter-spacing: .08em; line-height: 1; padding: 3px 6px; border-radius: 999px; color: #CBD5E1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); }
  .hub-profile-text .user-dropdown-badge.plus, .hub-profile-text .user-dropdown-badge.pro, .hub-profile-text .user-dropdown-badge.vip { color: #10B981; background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.35); }
  .hub-profile-gear { color: #64748B; flex-shrink: 0; }
}
@media (max-width: 900px) {
  .hub-v3 .hub-top-avatar { display: block !important; }
}

.hub-settings-head { margin: 0 0 22px; }
.hub-settings-head h1 { margin: 0 0 16px !important; font-family: "Space Grotesk", system-ui, sans-serif !important; font-size: 30px !important; font-weight: 700 !important; letter-spacing: -0.02em !important; color: #fff !important; }
.hub-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.hub-tab { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 9px; font-size: 14px; font-weight: 600; color: #94A3B8 !important; text-decoration: none !important; }
.hub-tab:hover { color: #F1F5F9 !important; }
.hub-tab.active { background: rgba(16,185,129,0.12); color: #fff !important; }

.hub-profile-main .pp-card { margin-bottom: 16px; }
.pp-id { display: flex; align-items: center; gap: 16px; }
.pp-avatar { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: #1e293b; flex-shrink: 0; }
.pp-id-text { flex: 1; min-width: 0; }
.pp-name { margin: 0 0 4px !important; font-family: "Space Grotesk", system-ui, sans-serif; font-size: 20px; font-weight: 700; color: #fff; }
.pp-email { margin: 0 !important; font-size: 14px; color: #94A3B8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-plan { font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: .08em; padding: 5px 9px; border-radius: 999px; color: #CBD5E1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); }
.pp-plan.plus, .pp-plan.pro, .pp-plan.vip { color: #10B981; background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.35); }
.pp-hint { margin: 16px 0 0 !important; font-size: 13px; color: #64748B; }
.pp-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pp-row h3, .pp-danger h3 { margin: 0 0 4px !important; font-size: 16px; font-weight: 700; color: #F1F5F9; }
.pp-sub { margin: 0 !important; font-size: 14px; color: #94A3B8; }
.pp-btn { flex-shrink: 0; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05); color: #F1F5F9; font-weight: 600; font-size: 14px; cursor: pointer; font-family: inherit; }
.pp-btn:hover { background: rgba(255,255,255,0.09); }
.pp-btn-quiet { color: #FCA5A5; border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.06); }
.pp-btn-quiet:hover { background: rgba(248,113,113,0.12); }
.pp-danger:not(.pp-card) { margin-top: 28px; padding: 18px 22px; border-radius: 14px; border: 1px solid rgba(248,113,113,0.2); }
.pp-danger p { margin: 0 !important; font-size: 14px; line-height: 1.55; color: #94A3B8; }
.pp-danger a { color: #F1F5F9; }
.pp-mobile-only { display: none; }
.pp-link-row { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 12px 2px; background: none; border: 0; color: #F1F5F9; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; font-family: inherit; }
.pp-link-row + .pp-link-row { border-top: 1px solid rgba(255,255,255,0.07); }
@media (max-width: 900px) { .pp-mobile-only { display: block; } .pp-row { flex-direction: column; align-items: flex-start; } }
/* v3e: profile card sits flat like the nav links; delete-account is a normal card with a red title */
@media (min-width: 901px) {
  .hub-sidebar .hub-profile-card { border: 0 !important; background: transparent !important; padding: 8px 10px !important; }
  .hub-sidebar .hub-profile-card:hover { background: rgba(255,255,255,0.04) !important; }
  .hub-sidebar .hub-profile-card.active { background: rgba(16,185,129,0.1) !important; }
  .hub-side-foot { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 10px; }
}
.pp-card.pp-danger { margin-top: 0; border-color: rgba(255,255,255,0.08); }
.pp-card.pp-danger h3 { color: #FCA5A5 !important; }
/* billing page's old rule hid tab-bar labels under 640px (Settings pages inherit it) */
@media (max-width: 900px) { .hub-v3-body .hub-sidebar .hub-nav-links .hub-nav-link span { display: block !important; } }
