    :root {
      --bg: #060a14;
      --card-bg: #0b1120;
      --card-border: #1e293b;
      --card-hover: #131d36;
      --text: #f8fafc;
      --text-muted: #94a3b8;
      --accent: #38bdf8;
      --emerald: #10b981;
      --amber: #f59e0b;
      --gold: #facc15;
      --gold-dark: #ca8a04;
      --gold-glow: rgba(250, 204, 21, 0.22);
      --indigo: #6366f1;
      --rose: #f43f5e;
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      background: var(--bg);
      color: var(--text);
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
      min-height: 100vh;
      line-height: 1.5;
    }
    /* Sticky Top Executive Bar (Obsidian & Sovereign Gold) */
    .top-bar {
      position: sticky;
      top: 0;
      z-index: 1000;
      background: rgba(6, 10, 20, 0.95);
      backdrop-filter: blur(14px);
      border-bottom: 1px solid rgba(234, 179, 8, 0.22);
      padding: 10px 24px;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    }
    .brand-wrap {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .brand-title {
      font-size: 15px;
      font-weight: 800;
      letter-spacing: -0.01em;
      color: #f8fafc;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .brand-gold-tag {
      background: linear-gradient(135deg, rgba(234, 179, 8, 0.2) 0%, rgba(161, 98, 7, 0.3) 100%);
      border: 1px solid var(--gold);
      color: var(--gold);
      font-size: 10.5px;
      font-weight: 800;
      padding: 3px 8px;
      border-radius: 999px;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      box-shadow: 0 0 10px rgba(234, 179, 8, 0.25);
    }
    .persp-switcher {
      display: flex;
      align-items: center;
      background: #090e1a;
      border: 1px solid #1e293b;
      border-radius: 10px;
      padding: 3px;
      gap: 4px;
    }
    .persp-label {
      font-size: 11px;
      color: #64748b;
      font-weight: 700;
      text-transform: uppercase;
      padding: 0 8px;
    }
    .persp-btn {
      background: transparent;
      border: 1px solid transparent;
      color: #94a3b8;
      font-size: 12px;
      font-weight: 700;
      padding: 6px 12px;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
    }
    .persp-btn:hover { color: #f8fafc; background: rgba(255,255,255,0.05); }
    .persp-btn.active[data-persp="all"] {
      background: #1e293b;
      color: #f8fafc;
      border-color: #38bdf8;
      box-shadow: 0 0 10px rgba(56,189,248,0.25);
    }
    .persp-btn.active[data-persp="customer"] {
      background: rgba(56,189,248,0.18);
      border-color: #38bdf8;
      color: #38bdf8;
      box-shadow: 0 0 12px rgba(56,189,248,0.3);
    }
    .persp-btn.active[data-persp="contractor"] {
      background: rgba(16,185,129,0.18);
      border-color: #10b981;
      color: #10b981;
      box-shadow: 0 0 12px rgba(16,185,129,0.3);
    }
    .quick-links {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .quick-link {
      font-size: 12px;
      font-weight: 700;
      text-decoration: none;
      padding: 6px 12px;
      border-radius: 8px;
      border: 1px solid #1e293b;
      background: #0d1527;
      color: #cbd5e1;
      transition: all 0.2s ease;
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }
    .quick-link:hover {
      background: #1e293b;
      color: #38bdf8;
      border-color: #38bdf8;
    }
    .quick-link.accent {
      background: rgba(234, 179, 8, 0.15);
      border-color: rgba(234, 179, 8, 0.45);
      color: var(--gold);
    }

    /* Perspective Banner */
    .persp-banner {
      background: linear-gradient(90deg, #091024 0%, #0d1527 50%, #091024 100%);
      border-bottom: 1px solid rgba(234, 179, 8, 0.18);
      padding: 10px 24px;
      font-size: 13px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      transition: all 0.3s ease;
    }
    .persp-banner-text {
      display: flex;
      align-items: center;
      gap: 8px;
      font-weight: 600;
    }
    .persp-banner-badges {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    .pill {
      font-size: 11px;
      font-weight: 700;
      padding: 3px 9px;
      border-radius: 6px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.12);
      color: #cbd5e1;
    }
    .pill.customer { background: rgba(56,189,248,0.15); border-color: rgba(56,189,248,0.4); color: #38bdf8; }
    .pill.contractor { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.4); color: #10b981; }
    .pill.gold { background: rgba(234, 179, 8, 0.16); border-color: rgba(234, 179, 8, 0.45); color: var(--gold); }

    /* Navigation Tabs */
    .nav-tabs {
      display: flex;
      gap: 4px;
      padding: 10px 24px 0 24px;
      border-bottom: 1px solid #1e293b;
      background: #080d1a;
      overflow-x: auto;
    }
    .tab-btn {
      background: transparent;
      border: none;
      border-bottom: 3px solid transparent;
      color: #94a3b8;
      font-size: 13px;
      font-weight: 700;
      padding: 11px 18px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      white-space: nowrap;
      transition: all 0.2s ease;
    }
    .tab-btn:hover { color: #f8fafc; }
    .tab-btn.active {
      color: var(--gold);
      border-bottom-color: var(--gold);
      background: rgba(234, 179, 8, 0.08);
      border-radius: 8px 8px 0 0;
    }

    /* Main Container */
    .portal-main {
      max-width: 1480px;
      margin: 0 auto;
      padding: 24px 20px 60px 20px;
    }
    .tab-pane { display: none; }
    .tab-pane.active { display: block; }

    /* Section Headers */
    .section-header {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 20px;
    }
    .section-title {
      font-size: 20px;
      font-weight: 800;
      color: #f8fafc;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .section-sub {
      font-size: 13px;
      color: #94a3b8;
      margin-top: 4px;
    }

    /* KPI Grid */
    .kpi-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
      gap: 14px;
      margin-bottom: 24px;
    }
    .kpi-box {
      background: var(--card-bg);
      border: 1px solid var(--card-border);
      border-radius: 12px;
      padding: 16px;
      position: relative;
      overflow: hidden;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    }
    .kpi-box::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0; height: 2px;
      background: linear-gradient(90deg, #facc15, #ca8a04);
    }
    .kpi-box.green::before { background: linear-gradient(90deg, #10b981, #059669); }
    .kpi-box.amber::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
    .kpi-val { font-size: 24px; font-weight: 800; color: #f8fafc; }
    .kpi-lbl { font-size: 12px; font-weight: 600; color: #94a3b8; margin-top: 4px; }
    .kpi-hint { font-size: 11px; color: #64748b; margin-top: 4px; }

    /* Cards Grid */
    .cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
      gap: 20px;
    }
    @media (max-width: 600px) {
      .cards-grid { grid-template-columns: 1fr; }
    }
    .card {
      background: var(--card-bg);
      border: 1px solid var(--card-border);
      border-radius: 14px;
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      position: relative;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    }
    .card:hover {
      border-color: rgba(250, 204, 21, 0.4);
      background: var(--card-hover);
      transform: translateY(-2px);
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 16px rgba(250, 204, 21, 0.15);
    }
    .card-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
    }
    .card-title {
      font-size: 16px;
      font-weight: 800;
      color: #f8fafc;
      line-height: 1.35;
    }
    .card-subtitle {
      font-size: 12px;
      color: #94a3b8;
      margin-top: 4px;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .card-badge {
      font-size: 11px;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 6px;
      white-space: nowrap;
    }
    .badge-trl { background: rgba(99,102,241,0.2); border: 1px solid rgba(99,102,241,0.4); color: #818cf8; }
    .badge-stage { background: rgba(56,189,248,0.2); border: 1px solid rgba(56,189,248,0.4); color: #38bdf8; }
    .badge-kyb { background: rgba(16,185,129,0.2); border: 1px solid rgba(16,185,129,0.4); color: #10b981; }

    /* Symmetry Boxes: Customer vs Contractor */
    .symmetry-box {
      background: #090f1d;
      border: 1px solid #1a253a;
      border-radius: 10px;
      padding: 12px 14px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      transition: all 0.2s ease;
    }
    .symmetry-box.customer-side {
      border-left: 3px solid #38bdf8;
    }
    .symmetry-box.contractor-side {
      border-left: 3px solid #10b981;
    }
    .perspective-customer .symmetry-box.customer-side {
      background: rgba(56,189,248,0.08);
      border-color: rgba(56,189,248,0.5);
      box-shadow: 0 0 14px rgba(56,189,248,0.15);
    }
    .perspective-contractor .symmetry-box.contractor-side {
      background: rgba(16,185,129,0.08);
      border-color: rgba(16,185,129,0.5);
      box-shadow: 0 0 14px rgba(16,185,129,0.15);
    }
    .sym-header {
      font-size: 12px;
      font-weight: 800;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .sym-header.customer-lbl { color: #38bdf8; }
    .sym-header.contractor-lbl { color: #10b981; }
    .sym-content {
      font-size: 13px;
      color: #cbd5e1;
      line-height: 1.45;
    }
    .sym-tax-tag {
      display: inline-block;
      margin-top: 4px;
      font-size: 11px;
      font-weight: 700;
      color: #38bdf8;
      background: rgba(56,189,248,0.1);
      padding: 2px 6px;
      border-radius: 4px;
      border: 1px dashed rgba(56,189,248,0.4);
    }

    /* Metrics Grid inside Cards */
    .metrics-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      background: #080d1a;
      padding: 10px;
      border-radius: 8px;
      border: 1px solid #162032;
    }
    .metric-item { text-align: center; }
    .metric-val { font-size: 14px; font-weight: 800; color: #f8fafc; font-variant-numeric: tabular-nums; }
    .metric-lbl { font-size: 11px; color: #64748b; }

    /* Action Buttons in Cards */
    .card-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: auto;
      padding-top: 12px;
      border-top: 1px solid #162032;
    }
    .btn {
      padding: 8px 14px;
      font-size: 12px;
      font-weight: 700;
      border-radius: 8px;
      border: 1px solid transparent;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: all 0.2s ease;
      text-decoration: none;
      white-space: nowrap;
    }
    .btn-customer {
      background: rgba(56,189,248,0.15);
      border-color: rgba(56,189,248,0.4);
      color: #38bdf8;
    }
    .btn-customer:hover {
      background: rgba(56,189,248,0.25);
      border-color: #38bdf8;
      color: #fff;
    }
    .btn-contractor {
      background: rgba(16,185,129,0.15);
      border-color: rgba(16,185,129,0.4);
      color: #10b981;
    }
    .btn-contractor:hover {
      background: rgba(16,185,129,0.25);
      border-color: #10b981;
      color: #fff;
    }
    .btn-gold {
      background: rgba(234, 179, 8, 0.16);
      border-color: rgba(234, 179, 8, 0.45);
      color: var(--gold);
    }
    .btn-gold:hover {
      background: rgba(234, 179, 8, 0.3);
      border-color: var(--gold);
      color: #ffffff;
      box-shadow: 0 0 12px rgba(234, 179, 8, 0.35);
    }
    .btn-purple {
      background: rgba(99,102,241,0.15);
      border-color: rgba(99,102,241,0.4);
      color: #818cf8;
    }
    .btn-purple:hover {
      background: rgba(99,102,241,0.25);
      border-color: #818cf8;
      color: #fff;
    }
    .btn-amber {
      background: rgba(245,158,11,0.15);
      border-color: rgba(245,158,11,0.4);
      color: #f59e0b;
    }
    .btn-amber:hover {
      background: rgba(245,158,11,0.25);
      border-color: #f59e0b;
      color: #fff;
    }
    .btn-storefront {
      background: #111a2e;
      border-color: #273752;
      color: #cbd5e1;
    }
    .btn-storefront:hover {
      background: #1e293b;
      border-color: #38bdf8;
      color: #38bdf8;
    }
    .btn-storefront.published {
      background: rgba(16,185,129,0.2);
      border-color: #10b981;
      color: #10b981;
      font-weight: 800;
    }

    /* Pain Solver Matrix Tab */
    .generator-panel {
      background: #0d1527;
      border: 1px solid #1e293b;
      border-radius: 14px;
      padding: 18px;
      margin-bottom: 24px;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }
    .gen-btns {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    /* Deal Messenger Tab */
    .messenger-wrap {
      display: grid;
      grid-template-columns: 340px 1fr;
      gap: 16px;
      height: 680px;
      background: #0d1527;
      border: 1px solid #1e293b;
      border-radius: 14px;
      overflow: hidden;
    }
    @media (max-width: 850px) {
      .messenger-wrap { grid-template-columns: 1fr; height: auto; }
    }
    .rooms-list {
      background: #080d1a;
      border-right: 1px solid #1e293b;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
    }
    .room-item {
      padding: 12px 14px;
      border-bottom: 1px solid #141f33;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .room-item:hover, .room-item.active { background: #131d36; }
    .room-title { font-size: 13px; font-weight: 700; color: #f8fafc; }
    .room-sub { font-size: 11px; color: #94a3b8; margin-top: 3px; display: flex; justify-content: space-between; }

    .chat-view {
      display: flex;
      flex-direction: column;
      height: 100%;
    }
    .chat-header {
      padding: 14px 20px;
      border-bottom: 1px solid #1e293b;
      background: #090e1a;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .chat-history {
      flex: 1;
      padding: 20px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 14px;
      background: #070b14;
    }
    .msg-bubble {
      max-width: 80%;
      padding: 12px 16px;
      border-radius: 12px;
      font-size: 13px;
      line-height: 1.45;
    }
    .msg-bubble.incoming {
      background: #131d36;
      border: 1px solid #1e293b;
      color: #e2e8f0;
      align-self: flex-start;
    }
    .msg-bubble.outgoing {
      background: rgba(56,189,248,0.15);
      border: 1px solid rgba(56,189,248,0.4);
      color: #f8fafc;
      align-self: flex-end;
    }
    .msg-bubble.doc {
      background: rgba(16,185,129,0.12);
      border: 1px solid rgba(16,185,129,0.4);
      color: #f8fafc;
      align-self: center;
      width: 90%;
      max-width: 90%;
    }
    .msg-time { font-size: 10px; color: #64748b; margin-top: 4px; text-align: right; }

    /* 1-Click Document Action Pills */
    .chat-doc-pills {
      padding: 8px 16px;
      background: #0a0f1d;
      border-top: 1px solid #1e293b;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .doc-pill-btn {
      font-size: 11px;
      font-weight: 700;
      padding: 4px 10px;
      border-radius: 6px;
      border: 1px solid #273752;
      background: #0f172a;
      color: #94a3b8;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .doc-pill-btn:hover {
      background: #1e293b;
      border-color: #38bdf8;
      color: #38bdf8;
    }

    .chat-input-bar {
      padding: 12px 16px;
      background: #090e1a;
      border-top: 1px solid #1e293b;
      display: flex;
      gap: 10px;
    }
    .chat-input {
      flex: 1;
      background: #070b14;
      border: 1px solid #1e293b;
      border-radius: 8px;
      padding: 10px 14px;
      color: #f8fafc;
      font-size: 13px;
      outline: none;
    }
    .chat-input:focus { border-color: #38bdf8; }

    /* Clubs & Feed Tab */
    .clubs-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
      gap: 16px;
      margin-bottom: 28px;
    }
    .club-card {
      background: #0d1527;
      border: 1px solid #1e293b;
      border-radius: 12px;
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .club-title { font-size: 15px; font-weight: 800; color: #f8fafc; }
    .club-desc { font-size: 12px; color: #94a3b8; }
    .club-meta { font-size: 11px; color: #64748b; display: flex; justify-content: space-between; align-items: center; }

    /* CEO Registry Tab */
    .ceo-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
      gap: 16px;
    }
    .ceo-card {
      background: #0d1527;
      border: 1px solid #1e293b;
      border-radius: 12px;
      padding: 16px;
      display: flex;
      gap: 14px;
    }
    .ceo-avatar {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      background: linear-gradient(135deg, #1e293b, var(--gold));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      font-weight: 800;
      color: #050811;
      flex-shrink: 0;
    }
    .ceo-info { flex: 1; }
    .ceo-name { font-size: 15px; font-weight: 800; color: #f8fafc; }
    .ceo-role { font-size: 12px; color: #38bdf8; font-weight: 600; }
    .ceo-company { font-size: 12px; color: #94a3b8; margin-top: 2px; }
    .ceo-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

    /* Modals */
    .modal-backdrop {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0, 0, 0, 0.75);
      backdrop-filter: blur(6px);
      z-index: 10000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    .modal-backdrop.active { display: flex; }
    .modal-card {
      background: #0d1527;
      border: 1px solid #273752;
      border-radius: 16px;
      max-width: 600px;
      width: 100%;
      max-height: 90vh;
      overflow-y: auto;
      padding: 24px;
      position: relative;
      box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    }
    .modal-close {
      position: absolute;
      top: 16px; right: 16px;
      background: #162032;
      border: 1px solid #273752;
      border-radius: 8px;
      color: #94a3b8;
      width: 32px; height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      cursor: pointer;
    }
    .modal-close:hover { color: #fff; background: #1e293b; }
    .modal-title { font-size: 17px; font-weight: 800; color: #f8fafc; margin-bottom: 8px; }
    .form-group { margin-bottom: 14px; }
    .form-label { display: block; font-size: 12px; font-weight: 700; color: #94a3b8; margin-bottom: 6px; }
    .form-input {
      width: 100%;
      background: #070b14;
      border: 1px solid #1e293b;
      border-radius: 8px;
      padding: 10px 12px;
      font-size: 13px;
      color: #f8fafc;
      outline: none;
    }
    .form-input:focus { border-color: #38bdf8; }
    .calc-results-box {
      background: #090e1a;
      border: 1px solid #1e293b;
      border-radius: 10px;
      padding: 14px;
      margin: 16px 0;
    }
    .calc-row {
      display: flex;
      justify-content: space-between;
      font-size: 13px;
      padding: 6px 0;
      border-bottom: 1px dashed #162032;
    }
    .calc-row:last-child { border-bottom: none; font-weight: 800; font-size: 14px; color: #38bdf8; padding-top: 10px; }

    /* Toast Notification */
    .toast-msg {
      position: fixed;
      bottom: 24px;
      right: 24px;
      background: #0f1d38;
      border: 1px solid var(--gold);
      box-shadow: 0 10px 30px rgba(0,0,0,0.7);
      border-radius: 10px;
      padding: 12px 18px;
      font-size: 13px;
      font-weight: 700;
      color: #f8fafc;
      z-index: 99999;
      display: none;
      align-items: center;
      gap: 10px;
    }
    .toast-msg.active { display: flex; animation: slideUp 0.3s ease; }
    @keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* MWG & Adaptive Tokens from club.html */
    /* ==========================================================================
       MODERN WEB GUIDANCE (MWG) & GLOBLEX CLUB ADAPTIVE TOKENS
       Architecture: light-dark() CSS Tokens, Content Visibility, Fluid Layouts
       ========================================================================== */
    :root {
      color-scheme: light dark;

      /* Typography Tokens */
      --glx-font-heading: 'Unbounded', 'Barlow Condensed', var(--gx-font-heading), system-ui, sans-serif;
      --glx-font-body: 'Golos Text', 'IBM Plex Sans', var(--gx-font-sans), system-ui, sans-serif;
      --glx-font-mono: 'JetBrains Mono', 'IBM Plex Mono', monospace;

      /* Adaptive light-dark() Palette */
      --glx-bg: light-dark(#f8fafc, #060a14);
      --glx-surface: light-dark(#ffffff, #0b1120);
      --glx-surface-elevated: light-dark(#f1f5f9, #111a2e);
      --glx-surface-hover: light-dark(#e2e8f0, #16223d);
      --glx-surface-glass: light-dark(rgba(255, 255, 255, 0.88), rgba(11, 17, 32, 0.88));
      --glx-text-primary: light-dark(#0f172a, #f8fafc);
      --glx-text-secondary: light-dark(#475569, #94a3b8);
      --glx-text-muted: light-dark(#64748b, #64748b);
      --glx-border: light-dark(#cbd5e1, #1e293b);
      --glx-border-subtle: light-dark(#e2e8f0, #172033);
      --glx-border-highlight: light-dark(rgba(65, 97, 128, 0.45), rgba(56, 189, 248, 0.35));

      /* Accents & Signals */
      --glx-accent: light-dark(#0284c7, #38bdf8);
      --glx-accent-hover: light-dark(#0369a1, #7dd3fc);
      --glx-gold: light-dark(#b45309, #facc15);
      --glx-gold-surface: light-dark(#fef3c7, rgba(234, 179, 8, 0.12));
      --glx-gold-border: light-dark(#f59e0b, rgba(250, 204, 21, 0.35));
      --glx-emerald: light-dark(#059669, #10b981);
      --glx-emerald-surface: light-dark(#d1fae5, rgba(16, 185, 129, 0.12));
      --glx-emerald-border: light-dark(#10b981, rgba(16, 185, 129, 0.35));
      --glx-rose: light-dark(#e11d48, #f43f5e);
      --glx-rose-surface: light-dark(#ffe4e6, rgba(244, 63, 94, 0.12));
      --glx-indigo: light-dark(#4f46e5, #818cf8);
      --glx-shadow-card: light-dark(0 4px 16px rgba(15, 23, 42, 0.06), 0 8px 32px rgba(0, 0, 0, 0.45));
      --glx-shadow-glow-gold: 0 0 24px rgba(250, 204, 21, 0.18);

      /* Backward Compatibility Mapping with css/club.css */
      --bg: var(--glx-bg);
      --card-bg: var(--glx-surface);
      --card-border: var(--glx-border);
      --card-hover: var(--glx-surface-hover);
      --text: var(--glx-text-primary);
      --text-muted: var(--glx-text-secondary);
      --accent: var(--glx-accent);
      --emerald: var(--glx-emerald);
      --gold: var(--glx-gold);
    }

    /* Base Reset & Typography Standards */
    body {
      background: var(--glx-bg);
      color: var(--glx-text-primary);
      font-family: var(--glx-font-body);
      margin: 0;
      padding: 0;
      min-height: 100vh;
      line-height: 1.55;
      -webkit-font-smoothing: antialiased;
    }

    h1, h2, h3, h4, .brand-title, .section-title, .editorial-title {
      font-family: var(--glx-font-heading);
      letter-spacing: -0.02em;
    }

    .glx-num, .tabular, [data-tabular="true"] {
      font-family: var(--glx-font-mono);
      font-variant-numeric: tabular-nums;
    }

    /* Accessible Focus Visible Standards */
    :focus-visible {
      outline: 2px solid var(--glx-accent);
      outline-offset: 2px;
    }

    /* Below-the-fold Performance Optimization */
    .gx-deferred-section {
      content-visibility: auto;
      contain-intrinsic-size: 1px 850px;
    }

    /* Top Institutional Telemetry Strip */
    .glx-top-institutional-bar {
      background: light-dark(#0f172a, #030712);
      color: light-dark(#e2e8f0, #94a3b8);
      font-family: var(--glx-font-mono);
      font-size: 11px;
      padding: 6px clamp(16px, 4vw, 48px);
      border-bottom: 1px solid light-dark(#1e293b, #111827);
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px 16px;
    }
    .glx-telemetry-cluster {
      display: flex;
      align-items: center;
      gap: 16px;
      flex-wrap: wrap;
    }
    .glx-telemetry-item {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .glx-status-indicator {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #10b981;
      display: inline-block;
      box-shadow: 0 0 8px #10b981;
    }

    /* Unified Globlex Institutional Header */
    .glx-institutional-header {
      position: sticky;
      top: 0;
      z-index: 90;
      background: var(--glx-surface-glass);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--glx-border);
      padding: 10px clamp(16px, 4vw, 48px);
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      flex-wrap: wrap;
    }
    .glx-brand-group {
      display: flex;
      align-items: center;
      gap: 12px;
      text-decoration: none;
      color: inherit;
    }
    .glx-brand-emblem {
      width: 32px;
      height: 32px;
      display: grid;
      place-items: center;
      border: 1px solid var(--glx-accent);
      color: var(--glx-accent);
      font-family: var(--glx-font-heading);
      font-weight: 700;
      font-size: 14px;
      letter-spacing: 0.04em;
    }
    .glx-brand-name {
      font-family: var(--glx-font-heading);
      font-weight: 700;
      font-size: 20px;
      letter-spacing: 0.08em;
      color: var(--glx-text-primary);
    }
    .glx-contour-tag {
      font-family: var(--glx-font-heading);
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.14em;
      padding: 2px 7px;
      border: 1px solid var(--glx-gold);
      color: var(--glx-gold);
      background: var(--glx-gold-surface);
      border-radius: 2px;
    }

    /* Contour Switcher Nav */
    .glx-contour-switcher {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .glx-contour-item {
      font-family: var(--glx-font-body);
      font-size: 13px;
      font-weight: 600;
      color: var(--glx-text-secondary);
      text-decoration: none;
      padding: 6px 12px;
      border-radius: 4px;
      transition: all 0.15s ease;
    }
    .glx-contour-item:hover {
      color: var(--glx-text-primary);
      background: var(--glx-surface-hover);
    }
    .glx-contour-item.active {
      color: var(--glx-accent);
      background: var(--glx-surface-elevated);
      border-bottom: 2px solid var(--glx-accent);
    }

    /* Header Action Cluster */
    .glx-header-actions {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-left: auto;
    }
    .glx-cbr-pill {
      font-family: var(--glx-font-mono);
      font-size: 11px;
      color: var(--glx-emerald);
      background: var(--glx-emerald-surface);
      border: 1px solid var(--glx-emerald-border);
      padding: 4px 10px;
      border-radius: 4px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-weight: 600;
    }

    /* Search Component */
    .glx-club-search-wrap {
      max-width: 1200px;
      margin: 20px auto 0;
      padding: 0 clamp(16px, 4vw, 48px);
    }
    .glx-search-box {
      display: flex;
      align-items: center;
      gap: 12px;
      background: var(--glx-surface);
      border: 1px solid var(--glx-border);
      border-radius: 6px;
      padding: 8px 16px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }
    .glx-search-box:focus-within {
      border-color: var(--glx-accent);
      box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
    }
    .glx-search-input {
      flex: 1;
      border: 0;
      background: transparent;
      color: var(--glx-text-primary);
      font-family: var(--glx-font-body);
      font-size: 14px;
      outline: none;
    }
    .glx-search-clear {
      background: transparent;
      border: 0;
      color: var(--glx-text-muted);
      cursor: pointer;
      font-size: 14px;
      padding: 4px;
    }
    .glx-search-tags {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 10px;
      flex-wrap: wrap;
    }
    .glx-search-tag-label {
      font-size: 11px;
      color: var(--glx-text-muted);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .glx-quick-filter {
      font-family: var(--glx-font-mono);
      font-size: 11.5px;
      padding: 3px 10px;
      border-radius: 4px;
      border: 1px solid var(--glx-border);
      background: var(--glx-surface);
      color: var(--glx-text-secondary);
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .glx-quick-filter:hover {
      border-color: var(--glx-accent);
      color: var(--glx-text-primary);
    }
    .glx-quick-filter.active {
      border-color: var(--glx-accent);
      background: var(--glx-surface-elevated);
      color: var(--glx-accent);
      font-weight: 600;
    }

    /* Editorial Section Containers */
    .glx-section-container {
      max-width: 1200px;
      margin: 40px auto;
      padding: 0 clamp(16px, 4vw, 48px);
    }
    .editorial-badge {
      font-family: var(--glx-font-mono);
      font-size: 12px;
      font-weight: 600;
      color: var(--glx-accent);
      text-transform: uppercase;
      letter-spacing: 0.1em;
      margin-bottom: 8px;
      display: inline-block;
    }
    .editorial-title {
      font-size: clamp(22px, 3.2vw, 36px);
      font-weight: 700;
      color: var(--glx-text-primary);
      margin: 0 0 10px;
      line-height: 1.2;
    }
    .editorial-sub {
      font-size: clamp(14px, 1.4vw, 16px);
      color: var(--glx-text-secondary);
      max-width: 820px;
      margin: 0 0 28px;
      line-height: 1.6;
    }

    /* Responsive Comparison Data Table */
    .glx-table-wrapper {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      border: 1px solid var(--glx-border);
      border-radius: 6px;
      background: var(--glx-surface);
      box-shadow: var(--glx-shadow-card);
      margin-top: 24px;
    }
    .glx-comparison-table {
      width: 100%;
      border-collapse: collapse;
      text-align: left;
      font-size: 13.5px;
      font-variant-numeric: tabular-nums;
    }
    .glx-comparison-table th,
    .glx-comparison-table td {
      padding: 14px 18px;
      border-bottom: 1px solid var(--glx-border);
      vertical-align: middle;
    }
    .glx-comparison-table thead th {
      background: var(--glx-surface-elevated);
      font-family: var(--glx-font-heading);
      font-weight: 700;
      font-size: 13px;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--glx-text-primary);
    }
    .glx-comparison-table th[scope="row"] {
      position: sticky;
      left: 0;
      z-index: 2;
      background: var(--glx-surface);
      font-weight: 600;
      color: var(--glx-text-primary);
      border-right: 1px solid var(--glx-border);
      min-width: 220px;
    }
    .glx-comparison-table tr:hover th[scope="row"],
    .glx-comparison-table tr:hover td {
      background: var(--glx-surface-hover);
    }
    .glx-tier-col-sovereign {
      background: light-dark(rgba(254, 243, 199, 0.4), rgba(234, 179, 8, 0.04));
    }
    .glx-tier-col-pro {
      background: light-dark(rgba(240, 249, 255, 0.4), rgba(2, 132, 199, 0.04));
    }

    /* Embedded & Dialog Registration Module (04 · Регистрация) */
    .glx-registration-card {
      background: var(--glx-surface);
      border: 1px solid var(--glx-border-highlight);
      border-radius: 8px;
      padding: clamp(20px, 3vw, 36px);
      box-shadow: var(--glx-shadow-card);
    }
    .glx-step-strip {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 16px;
      margin-bottom: 28px;
    }
    .glx-step-item {
      padding: 14px;
      border: 1px solid var(--glx-border);
      border-radius: 6px;
      background: var(--glx-surface-elevated);
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .glx-step-item.active {
      border-color: var(--glx-accent);
      background: light-dark(#f0f9ff, #0c1a30);
    }
    .glx-step-num {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--glx-accent);
      color: #fff;
      display: grid;
      place-items: center;
      font-family: var(--glx-font-mono);
      font-weight: 700;
      font-size: 12px;
      flex-shrink: 0;
    }
    .glx-step-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--glx-text-primary);
    }

    /* MWG Form Validation States (:user-valid / :user-invalid) */
    .glx-form-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 20px;
    }
    .glx-field-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .glx-field-label {
      font-size: 12.5px;
      font-weight: 600;
      color: var(--glx-text-secondary);
    }
    .glx-input-control {
      background: var(--glx-surface-elevated);
      border: 1px solid var(--glx-border);
      border-radius: 4px;
      color: var(--glx-text-primary);
      font-family: var(--glx-font-body);
      font-size: 14px;
      padding: 10px 14px;
      outline: none;
      transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }
    .glx-input-control:focus {
      border-color: var(--glx-accent);
      box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
    }
    .glx-input-control:user-valid {
      border-color: var(--glx-emerald);
    }
    .glx-input-control:user-invalid {
      border-color: var(--glx-rose);
    }
    .glx-field-hint {
      font-size: 11.5px;
      color: var(--glx-text-muted);
    }

    /* Live ЕГРЮЛ Preview Box */
    .glx-egrul-preview {
      margin-top: 14px;
      padding: 14px 18px;
      border: 1px dashed var(--glx-border-highlight);
      border-radius: 6px;
      background: var(--glx-surface-elevated);
      font-size: 12.5px;
      line-height: 1.5;
      display: none;
    }
    .glx-egrul-preview.active {
      display: block;
    }

    /* Native Modal Dialog: #glxClubJoinDialog */
    dialog#glxClubJoinDialog {
      border: 1px solid var(--glx-border-highlight);
      background: var(--glx-surface);
      color: var(--glx-text-primary);
      border-radius: 8px;
      box-shadow: var(--glx-shadow-card);
      padding: 0;
      max-width: 640px;
      width: calc(100% - 32px);
      margin: auto;
      transition: opacity 0.25s ease, transform 0.25s ease, overlay 0.25s ease allow-discrete, display 0.25s ease allow-discrete;
      opacity: 0;
      transform: translateY(20px) scale(0.97);
    }
    dialog#glxClubJoinDialog[open] {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
    @starting-style {
      dialog#glxClubJoinDialog[open] {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
      }
    }
    dialog#glxClubJoinDialog::backdrop {
      background: rgba(6, 10, 20, 0.75);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      transition: opacity 0.25s ease, overlay 0.25s ease allow-discrete, display 0.25s ease allow-discrete;
      opacity: 0;
    }
    dialog#glxClubJoinDialog[open]::backdrop {
      opacity: 1;
    }
    @starting-style {
      dialog#glxClubJoinDialog[open]::backdrop {
        opacity: 0;
      }
    }

    .glx-dialog-header {
      padding: 18px 24px;
      border-bottom: 1px solid var(--glx-border);
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: var(--glx-surface-elevated);
    }
    .glx-dialog-title {
      font-family: var(--glx-font-heading);
      font-size: 16px;
      font-weight: 700;
      margin: 0;
    }
    .glx-dialog-close {
      background: transparent;
      border: 0;
      color: var(--glx-text-muted);
      font-size: 20px;
      cursor: pointer;
      line-height: 1;
      padding: 4px 8px;
    }
    .glx-dialog-body {
      padding: 24px;
      max-height: 80vh;
      overflow-y: auto;
    }

    /* Committee Cards */
    .glx-committee-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 20px;
      margin-top: 24px;
    }
    .glx-committee-card {
      background: var(--glx-surface);
      border: 1px solid var(--glx-border);
      border-radius: 6px;
      padding: 22px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
      transition: transform 0.2s ease, border-color 0.2s ease;
    }
    .glx-committee-card:hover {
      transform: translateY(-2px);
      border-color: var(--glx-accent);
    }

    /* Unified Footer */
    .glx-institutional-footer {
      border-top: 1px solid var(--glx-border);
      background: var(--glx-surface);
      margin-top: 80px;
      padding: 48px clamp(16px, 4vw, 48px) 32px;
      color: var(--glx-text-secondary);
      font-size: 13px;
    }
    .glx-footer-grid {
      max-width: 1200px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 32px;
      margin-bottom: 36px;
    }
    .glx-footer-bottom {
      max-width: 1200px;
      margin: 0 auto;
      padding-top: 24px;
      border-top: 1px solid var(--glx-border-subtle);
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 16px;
      font-size: 12px;
      color: var(--glx-text-muted);
    }

/* Club join dialog: ЕГРЮЛ preview, status and 152-ФЗ notice */
.club-egrul-preview {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--glx-text-secondary);
}
.club-form-status {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--glx-text-primary);
}
.club-form-consent {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--glx-text-muted);
}
