/* ============================================================
       Bluepineapple Trust Center — Design System 
       Inspired by SolveFins Data: dark fintech, neon accents, glassmorphism
       ============================================================ */

    /* ===== RESET & BASE ===== */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --bg-base: #050d1e;
      --bg-surface: #071428;
      --bg-card: #0a1c38;
      --bg-glass: rgba(10, 28, 60, 0.55);

      --blue-900: #0D1F4E;
      --blue-700: #0A3AA0;
      --blue-500: #0A4FDB;
      --blue-400: #2D6FFF;
      --blue-300: #5A90FF;
      --blue-100: #B8CFFE;

      --green-500: #00F5C4;
      --green-400: #00D9AD;
      --green-200: #A0FDE8;

      --white: #ffffff;
      --gray-100: #e8edf8;
      --gray-300: #8fa3c8;
      --gray-500: #4a5f82;
      --gray-700: #222e45;

      --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
      --container: 1200px;
      --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    }

    html { scroll-behavior: smooth; }
    body {
      font-family: var(--font-body);
      background: var(--bg-base);
      color: var(--white);
      line-height: 1.6;
    }

    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: var(--bg-base); }
    ::-webkit-scrollbar-thumb { background: var(--blue-700); border-radius: 3px; }

    a { color: var(--blue-300); text-decoration: none; }
    a:hover { color: var(--blue-100); }

    /* ===== TYPE ===== */
    h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
    h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
    h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
    h3 { font-size: 1.15rem; }
    p { color: var(--gray-300); line-height: 1.7; }

    .gradient-text {
      background: linear-gradient(135deg, var(--blue-400) 0%, var(--green-500) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .section-tag {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 0.75rem;
      font-weight: 600;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--green-500);
      border: 1px solid rgba(0, 245, 196, 0.25);
      background: rgba(0, 245, 196, 0.06);
      padding: 5px 12px;
      border-radius: 100px;
      margin-bottom: 16px;
    }

    /* ===== LAYOUT ===== */
    .container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
    .section { padding: 80px 0; position: relative; }

    /* ===== NAV ===== */
    .nav {
      position: sticky; top: 0; z-index: 100;
      background: rgba(5, 13, 30, 0.88);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .nav-inner {
      max-width: var(--container); margin: 0 auto; padding: 0 32px;
      display: flex; align-items: center; height: 72px; gap: 2rem;
    }
    .nav-brand {
      display: flex; align-items: flex-start; gap: 12px;
      font-weight: 600; font-size: 1rem; color: var(--white); white-space: nowrap;
      text-decoration: none; line-height: 1.2;
    }
    .nav-brand img { height: 32px; width: auto; display: block; margin-top: -13px; }
    .nav-brand-accent { color: var(--green-500); }
    .nav-tabs { display: flex; gap: 4px; margin-left: auto; }
    .nav-tab {
      padding: 6px 14px; border-radius: 8px; border: none; background: none;
      font-size: 0.85rem; font-weight: 500; color: var(--gray-300); cursor: pointer;
      white-space: nowrap; transition: all 0.2s;
      font-family: var(--font-body);
    }
    .nav-tab:hover { background: rgba(255,255,255,0.06); color: var(--white); }
    .nav-tab.active {
      background: rgba(10, 79, 219, 0.2);
      color: var(--blue-300);
      box-shadow: inset 0 0 0 1px rgba(10, 79, 219, 0.3);
    }

    /* ===== HERO ===== */
    .hero {
      position: relative; overflow: hidden;
      padding: 80px 0 64px;
      background: linear-gradient(180deg, #050d1e 0%, #071428 50%, #0a1c38 100%);
    }
    .hero-glow {
      position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.3; pointer-events: none;
    }
    .hero-glow-1 {
      width: 700px; height: 700px;
      background: radial-gradient(circle, var(--blue-500), transparent 70%);
      top: -300px; right: -100px;
    }
    .hero-glow-2 {
      width: 500px; height: 500px;
      background: radial-gradient(circle, var(--green-500), transparent 70%);
      bottom: -200px; left: 10%; opacity: 0.12;
    }
    .hero-grid {
      position: absolute; inset: 0;
      background-image:
        linear-gradient(rgba(10, 79, 219, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 79, 219, 0.05) 1px, transparent 1px);
      background-size: 60px 60px;
      mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
      pointer-events: none;
    }
    .hero-content { position: relative; z-index: 1; }
    .hero h1 { margin-bottom: 20px; }
    .hero p { font-size: 1.05rem; max-width: 780px; margin-bottom: 32px; }
    .hero-stats {
      display: flex; flex-wrap: wrap; gap: 0;
      padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.06);
    }
    .hero-stat {
      display: flex; align-items: center; gap: 12px;
      padding: 0 28px;
    }
    .hero-stat:first-child { padding-left: 0; }
    .hero-stat + .hero-stat { border-left: 1px solid var(--gray-700); }
    .hero-stat-icon {
      width: 40px; height: 40px; border-radius: 10px;
      background: rgba(10, 79, 219, 0.15);
      border: 1px solid rgba(10, 79, 219, 0.25);
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
      color: var(--blue-300);
    }
    .hero-stat-value {
      font-size: 1rem; font-weight: 700; line-height: 1.2;
    }
    .hero-stat-label { font-size: 0.78rem; color: var(--gray-300); margin-top: 1px; }
    .badge-dot {
      width: 8px; height: 8px; background: var(--green-500); border-radius: 50%;
      animation: pulse 2s ease-in-out infinite;
    }
    @keyframes pulse {
      0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0,245,196,0.6); }
      50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(0,245,196,0); }
    }

    /* ===== TAB PANELS ===== */
    .tab-panel { display: none; }
    .tab-panel.active { display: block; animation: fadeIn 0.3s var(--ease-out); }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

    .tab-panel > h2 { margin-bottom: 8px; }
    .tab-panel > .subtitle { color: var(--gray-300); margin-bottom: 32px; max-width: 720px; font-size: 0.95rem; }

    /* ===== CARDS ===== */
    .card-grid {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
    }
    .card {
      background: var(--bg-card); border-radius: 16px;
      border: 1px solid rgba(255,255,255,0.06);
      padding: 28px; transition: all 0.3s var(--ease-out); position: relative; overflow: hidden;
    }
    .card::before {
      content: ''; position: absolute; inset: 0;
      background: linear-gradient(135deg, rgba(10,79,219,0.06), transparent);
      opacity: 0; transition: opacity 0.35s;
    }
    .card:hover { transform: translateY(-4px); border-color: rgba(10,79,219,0.3); }
    .card:hover::before { opacity: 1; }
    .card-icon {
      width: 44px; height: 44px; border-radius: 12px;
      background: rgba(10,79,219,0.12);
      border: 1px solid rgba(10,79,219,0.25);
      display: flex; align-items: center; justify-content: center;
      font-size: 1.25rem; margin-bottom: 16px;
      color: var(--blue-300); position: relative;
    }
    .card h3 { font-size: 1rem; margin-bottom: 8px; position: relative; }
    .card p { font-size: 0.87rem; color: var(--gray-300); line-height: 1.6; position: relative; }

    /* ===== CONTROLS ===== */
    .control-group { margin-bottom: 28px; }
    .control-group h3 {
      font-size: 1rem; font-weight: 700; margin-bottom: 12px;
      display: flex; align-items: center; gap: 8px;
    }
    .control-count {
      font-size: 0.7rem; font-weight: 600; color: var(--gray-500);
      background: rgba(255,255,255,0.05); padding: 2px 8px; border-radius: 999px;
    }
    .control-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 4px; }
    .control-list li {
      display: flex; align-items: center; gap: 8px;
      padding: 8px 12px; border-radius: 8px;
      font-size: 0.85rem; color: var(--gray-100);
      background: rgba(255,255,255,0.03);
    }
    .control-list li::before { content: "✓"; color: var(--green-500); font-weight: 700; font-size: 0.75rem; }

    /* ===== COMPLIANCE ===== */
    .compliance-cards {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
    }
    .comp-card {
      background: var(--bg-card); border-radius: 16px;
      border: 1px solid rgba(255,255,255,0.06);
      padding: 28px; position: relative; overflow: hidden;
      transition: all 0.3s var(--ease-out);
    }
    .comp-card:hover { transform: translateY(-4px); border-color: rgba(10,79,219,0.3); }
    .comp-card::after {
      content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
      opacity: 0; transition: opacity 0.35s;
    }
    .comp-card:hover::after { opacity: 1; }
    .comp-card.status-cert::after { background: linear-gradient(90deg, var(--green-500), var(--blue-500)); }
    .comp-card.status-progress::after { background: linear-gradient(90deg, #f59e0b, var(--blue-500)); }
    .comp-card.status-compliant::after { background: linear-gradient(90deg, var(--blue-400), var(--blue-700)); }
    .comp-card h3 { font-size: 1rem; margin-bottom: 4px; position: relative; }
    .comp-card .comp-framework { font-size: 0.87rem; color: var(--gray-300); margin-bottom: 12px; position: relative; }
    .badge {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 4px 12px; border-radius: 999px;
      font-size: 0.75rem; font-weight: 600;
    }
    .badge-cert { background: rgba(0,245,196,0.1); color: var(--green-500); border: 1px solid rgba(0,245,196,0.25); }
    .badge-progress { background: rgba(245,158,11,0.1); color: #f59e0b; border: 1px solid rgba(245,158,11,0.25); }
    .badge-compliant { background: rgba(10,79,219,0.1); color: var(--blue-300); border: 1px solid rgba(10,79,219,0.25); }
    .comp-detail { font-size: 0.82rem; color: var(--gray-300); margin-top: 8px; position: relative; }

    /* ===== RESOURCES ===== */
    .resources-grid {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px;
    }
    .resource-item {
      display: flex; align-items: center; gap: 12px;
      background: var(--bg-card); border: 1px solid rgba(255,255,255,0.06);
      border-radius: 12px; padding: 14px 16px;
      transition: all 0.25s var(--ease-out); cursor: pointer; text-decoration: none;
    }
    .resource-item:hover {
      border-color: rgba(10,79,219,0.4);
      transform: translateY(-2px);
      box-shadow: 0 4px 20px rgba(10,79,219,0.15);
    }
    .resource-icon {
      width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
      background: rgba(10,79,219,0.12); color: var(--blue-300); font-size: 1rem;
    }
    .resource-info { flex: 1; min-width: 0; }
    .resource-name { font-size: 0.85rem; font-weight: 600; color: var(--gray-100); }
    .resource-meta { font-size: 0.72rem; color: var(--gray-500); margin-top: 2px; }
    .resource-link {
      font-size: 0.75rem; color: var(--blue-300); font-weight: 500; white-space: nowrap;
      font-family: var(--font-mono);
    }

    /* ===== MOBILE SELECTOR ===== */
    .mobile-tab-select {
      display: none; width: 100%;
      background: var(--bg-card); border: 1px solid rgba(255,255,255,0.1);
      border-radius: 10px; font-size: 0.875rem;
      color: var(--white); padding: 10px 14px;
      font-family: var(--font-body); margin-bottom: 28px;
      outline: none; cursor: pointer;
    }
    .mobile-tab-select option { background: var(--bg-card); color: var(--white); }

    /* ===== SECTION HEADERS FOR TABS ===== */
    .tab-section-header {
      display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
    }

    /* ===== FOOTER ===== */
    .footer {
      border-top: 1px solid rgba(255,255,255,0.05);
      padding: 40px 32px; text-align: center;
    }
    .footer-inner { max-width: var(--container); margin: 0 auto; }
    .footer p { font-size: 0.82rem; color: var(--gray-500); }
    .footer a { color: var(--gray-300); }
    .footer a:hover { color: var(--white); }

    /* ===== RESOURCE GROUP HEADERS ===== */
    .resource-group { margin-bottom: 28px; }
    .resource-group-header {
      display: flex; align-items: center; gap: 8px;
      margin-bottom: 12px; position: relative;
    }
    .resource-group-header h3 {
      font-size: 1rem; font-weight: 700;
    }
    .resource-group-header .count {
      font-size: 0.7rem; font-weight: 600; color: var(--gray-500);
      background: rgba(255,255,255,0.05); padding: 2px 8px; border-radius: 999px;
    }

    /* ===== RESPONSIVE ===== */
    @media (max-width: 768px) {
      .nav-tabs { display: none; }
      .mobile-tab-select { display: block; }
      .container { padding: 0 20px; }
      .section { padding: 48px 0; }
      .hero { padding: 56px 0 48px; }
      .hero p { font-size: 0.95rem; }
      .hero-stats { flex-direction: column; gap: 12px; }
      .hero-stat { padding: 0; }
      .hero-stat + .hero-stat { border-left: none; padding-top: 12px; border-top: 1px solid var(--gray-700); }
      .card-grid { grid-template-columns: 1fr; }
      .resources-grid { grid-template-columns: 1fr; }
      .control-list { grid-template-columns: 1fr; }
      .compliance-cards { grid-template-columns: 1fr; }
    }

    @media (max-width: 480px) {
      .nav-inner { padding: 0 16px; gap: 12px; }
      .hero-stat-value { font-size: 0.9rem; }
    }

    @media print {
      .nav { position: static; background: none; border: none; }
      .hero { background: none !important; color: #000; padding: 2rem 0; }
      .hero p { color: #333; }
      .hero-glow, .hero-grid { display: none; }
      .card, .comp-card, .resource-item, .control-list li { background: #f9f9f9 !important; border-color: #ddd !important; }
      .card h3, .comp-card h3, .resource-name { color: #000 !important; }
      .card p, .comp-detail, .resource-meta { color: #555 !important; }
      .tab-panel { display: block !important; }
      .tab-panel:not(:first-child) { margin-top: 2rem; page-break-before: always; }
      .nav-tabs, .mobile-tab-select { display: none; }
      .badge-cert { background: #d1fae5 !important; color: #065f46 !important; border-color: #065f46 !important; }
      .badge-progress { background: #fef3c7 !important; color: #92400e !important; border-color: #92400e !important; }
      .badge-compliant { background: #dbeafe !important; color: #1e40af !important; border-color: #1e40af !important; }
    }

    /* ===== GATED DOCUMENT CARDS ===== */
    .available-docs { display: flex; flex-direction: column; gap: 12px; }
    .doc-card {
      display: flex; align-items: center; gap: 16px;
      background: var(--bg-card); border: 1px solid rgba(255,255,255,0.06);
      border-radius: 16px; padding: 20px 24px;
      transition: all 0.3s var(--ease-out);
    }
    .doc-card:hover { border-color: rgba(10,79,219,0.3); transform: translateY(-2px); }
    .doc-card-icon {
      width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
      background: rgba(10,79,219,0.12); border: 1px solid rgba(10,79,219,0.25);
      display: flex; align-items: center; justify-content: center;
      font-size: 1.5rem; color: var(--blue-300);
    }
    .doc-card-body { flex: 1; min-width: 0; }
    .doc-card-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 2px; }
    .doc-card-meta { font-size: 0.72rem; color: var(--gray-500); margin-bottom: 4px; font-family: var(--font-mono); }
    .doc-card-desc { font-size: 0.82rem; color: var(--gray-300); line-height: 1.5; }
    .doc-card-btn {
      flex-shrink: 0; padding: 10px 20px;
      background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
      color: var(--white); border: none; border-radius: 10px;
      font-size: 0.82rem; font-weight: 600; cursor: pointer;
      transition: all 0.25s var(--ease-out); white-space: nowrap;
      font-family: var(--font-body);
      box-shadow: 0 0 0 1px rgba(10,79,219,0.4), 0 4px 12px rgba(10,79,219,0.25);
    }
    .doc-card-btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(10,79,219,0.6), 0 8px 24px rgba(10,79,219,0.4); }
    .doc-card-btn-ghost {
      background: transparent; color: var(--blue-300);
      border: 1px solid rgba(10,79,219,0.3);
      box-shadow: none;
    }
    .doc-card-btn-ghost:hover {
      background: rgba(10,79,219,0.08);
      border-color: var(--blue-400);
      box-shadow: none;
      transform: translateY(-2px);
    }
    .doc-card-public { border-color: rgba(0,245,196,0.15); }
    .doc-card-public .doc-card-icon { background: rgba(0,245,196,0.08); border-color: rgba(0,245,196,0.2); color: var(--green-500); }
    @media (max-width: 768px) {
      .doc-card { flex-direction: column; text-align: center; padding: 20px; }
      .doc-card-btn { width: 100%; }
    }