 :root {
   --bg-dark: #0b0f19;
   --card-bg: #1e293b;
   --card-border: #334155;
   --text-primary: #f8fafc;
   --text-secondary: #94a3b8;
   --text-muted: #64748b;
   --accent-primary: #3b82f6;
   --accent-hover: #2563eb;
   --sev-high: #ef4444;
   --sev-med: #f59e0b;
   --sev-low: #eab308;
   --sev-info: #10b981;
   --radius: 10px;
 }
 * { box-sizing: border-box; margin:0; padding:0; }
 html { font-size: 18px; }
 body {
   font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
   font-size: 1.15rem;
   background-color: var(--bg-dark);
   color: var(--text-primary);
   line-height: 1.6;
   padding: 1.5rem 2rem;
 }
  .container {
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
  }
  .app-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1.75rem;
    align-items: start;
  }
  @media (max-width: 992px) {
    .app-layout {
      grid-template-columns: 1fr;
    }
  }
  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  .donate-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-top: 4px solid #ec4899;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.15);
  }
  .donate-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f472b6;
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }
  .donate-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.8rem;
  }
  .donate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.55rem 0.6rem;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--card-border);
    transition: all 0.2s ease;
    text-decoration: none;
  }
  .btn-paypal { background: #003087; color: #fff; border: none; }
  .btn-paypal:hover { background: #001c54; transform: translateY(-2px); }

  .modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
  }
  .modal-box {
    background: #1e293b;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    width: 90%;
    max-width: 440px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    color: var(--text-primary);
  }
  .modal-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
  }
 header {
   margin-bottom: 2rem;
   padding-bottom: 1.5rem;
   border-bottom: 1px solid var(--card-border);
   display: flex;
   justify-content: space-between;
   align-items: flex-start;
   flex-wrap: wrap;
   gap: 1rem;
 }
 .logo-group {
   display: flex;
   align-items: center;
   gap: 0.75rem;
 }
 .logo-icon {
   width: 38px;
   height: 38px;
   background: linear-gradient(135deg, #3b82f6, #6366f1);
   border-radius: 8px;
   display: flex;
   align-items: center;
   justify-content: center;
   box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
 }
 h1 {
   font-size: 1.7rem;
   font-weight: 700;
   letter-spacing: -0.02em;
   color: var(--text-primary);
 }
 .subtitle {
   color: var(--text-secondary);
   font-size: 1.0rem;
   margin-top: 0.2rem;
 }
 .header-badges {
   display: flex;
   gap: 0.5rem;
   flex-wrap: wrap;
 }
 .badge {
   font-size: 0.84rem;
   padding: 0.25rem 0.6rem;
   border-radius: 20px;
   background: rgba(51, 65, 85, 0.6);
   border: 1px solid var(--card-border);
   color: var(--text-secondary);
   font-weight: 500;
 }

 .card {
   background: var(--card-bg);
   border: 1px solid var(--card-border);
   border-radius: var(--radius);
   padding: 1.5rem;
   margin-bottom: 1.5rem;
   box-shadow: 0 4px 20px rgba(0,0,0,0.2);
 }
 .card-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 1rem;
   gap: 1rem;
   flex-wrap: wrap;
 }
 .card-title {
   font-size: 1.2rem;
   font-weight: 600;
   display: flex;
   align-items: center;
   gap: 0.5rem;
   color: var(--text-primary);
 }
 .icon { width: 20px; height: 20px; stroke: var(--accent-primary); }
 .icon-sm { width: 16px; height: 16px; margin-right: 0.3rem; vertical-align: middle; }

 form.scan-form {
   display: flex;
   gap: 0.75rem;
   flex-wrap: wrap;
   align-items: center;
 }
 input[type=text].url-input {
   flex: 1;
   min-width: 280px;
   padding: 0.75rem 1rem;
   font-size: 1.05rem;
   background: #0f172a;
   border: 1px solid var(--card-border);
   border-radius: 8px;
   color: var(--text-primary);
   outline: none;
   transition: border-color 0.2s, box-shadow 0.2s;
 }
 input[type=text].url-input:focus {
   border-color: var(--accent-primary);
   box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
 }
 .btn {
   padding: 0.75rem 1.25rem;
   border-radius: 8px;
   border: none;
   font-weight: 600;
   font-size: 1.05rem;
   cursor: pointer;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
 }
 .btn-primary {
   background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
   color: #fff;
   box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
 }
 .btn-primary:hover {
   background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
 }
 .btn-secondary {
   background: #334155;
   color: var(--text-primary);
 }
 .btn-secondary:hover { background: #475569; }
 .btn-success {
   background: linear-gradient(135deg, #10b981 0%, #059669 100%);
   color: #fff;
   box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
 }
 .btn-success:hover { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
 .btn-sm { padding: 0.4rem 0.8rem; font-size: 0.95rem; }

 .checkbox-label {
   display: flex;
   align-items: center;
   gap: 0.4rem;
   color: var(--text-secondary);
   font-size: 1.0rem;
   cursor: pointer;
   user-select: none;
   white-space: nowrap;
 }
 input[type=checkbox] {
   accent-color: var(--accent-primary);
   width: 16px;
   height: 16px;
 }

  .security-guarantee-card {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-left: 5px solid var(--sev-info);
  }
 .demo-card {
   background: rgba(30, 41, 59, 0.7);
   border: 1px solid rgba(245, 158, 11, 0.3);
   border-left: 4px solid var(--sev-med);
 }
 .demo-flex {
   display: flex;
   justify-content: space-between;
   align-items: center;
   flex-wrap: wrap;
   gap: 1rem;
 }

 .metrics-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
   gap: 1rem;
   margin-bottom: 1.5rem;
 }
 .metric-card {
   background: var(--card-bg);
   border: 1px solid var(--card-border);
   border-radius: var(--radius);
   padding: 1.25rem;
 }
 .metric-title {
   font-size: 0.95rem;
   color: var(--text-secondary);
   text-transform: uppercase;
   letter-spacing: 0.05em;
   font-weight: 600;
 }
 .metric-value {
   font-size: 1.8rem;
   font-weight: 700;
   margin: 0.4rem 0 0.1rem 0;
 }
 .metric-sub {
   font-size: 0.89rem;
   color: var(--text-muted);
 }
 .status-danger { color: var(--sev-high); }
 .status-warning { color: var(--sev-med); }
 .status-secure { color: var(--sev-info); }
 .text-high { color: var(--sev-high); }
 .text-med { color: var(--sev-med); }
 .text-low { color: var(--sev-low); }

 .filter-toolbar {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 1rem;
   gap: 1rem;
   flex-wrap: wrap;
 }
 .filter-tabs {
   display: flex;
   gap: 0.4rem;
 }
 .filter-btn {
   background: #0f172a;
   border: 1px solid var(--card-border);
   color: var(--text-secondary);
   padding: 0.4rem 0.8rem;
   border-radius: 6px;
   font-size: 0.95rem;
   cursor: pointer;
   transition: all 0.2s;
 }
 .filter-btn.active, .filter-btn:hover {
   background: var(--accent-primary);
   color: #fff;
   border-color: var(--accent-primary);
 }
 .search-field {
   padding: 0.4rem 0.8rem;
   font-size: 0.95rem;
   background: #0f172a;
   border: 1px solid var(--card-border);
   border-radius: 6px;
   color: var(--text-primary);
   outline: none;
   width: 240px;
 }

 .finding-card {
   background: var(--card-bg);
   border: 1px solid var(--card-border);
   border-radius: var(--radius);
   padding: 1.25rem;
   margin-bottom: 1rem;
   transition: transform 0.15s, box-shadow 0.15s;
 }
 .finding-card:hover {
   box-shadow: 0 4px 15px rgba(0,0,0,0.3);
 }
 .finding-header {
   display: flex;
   align-items: center;
   gap: 0.6rem;
   flex-wrap: wrap;
   margin-bottom: 0.6rem;
 }
 .finding-title {
   font-size: 1.15rem;
   font-weight: 600;
   color: var(--text-primary);
   flex: 1;
 }
 .sev-badge {
   font-size: 0.78rem;
   font-weight: 700;
   padding: 0.2rem 0.5rem;
   border-radius: 4px;
   color: #fff;
   letter-spacing: 0.05em;
 }
  .sev-high { background: var(--sev-high); }
  .sev-medium { background: var(--sev-med); }
  .sev-low { background: var(--sev-low); color: #000; }
  .sev-info { background: var(--sev-info); }
  .conf-high { background: #059669; }
  .conf-medium { background: #d97706; }
  .conf-low { background: #64748b; }
  .tags-badge {
    font-size: 0.84rem;
    color: var(--text-muted);
    background: #0f172a;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--card-border);
  }
  .finding-context {
    font-size: 0.87rem;
    color: var(--accent-primary);
    margin-bottom: 0.75rem;
  }
  .citation-meta {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
  }
  .citation-match {
    color: #34d399;
    margin-right: 0.5rem;
  }

 .finding-detail {
   color: var(--text-secondary);
   font-size: 1.02rem;
   margin-bottom: 0.75rem;
 }
 .fix-box {
   background: rgba(16, 185, 129, 0.1);
   border: 1px solid rgba(16, 185, 129, 0.3);
   padding: 0.6rem 0.8rem;
   border-radius: 6px;
   font-size: 0.98rem;
   color: #a7f3d0;
   margin-bottom: 0.75rem;
 }

 .citations-wrapper {
   margin-top: 0.8rem;
   padding-top: 0.8rem;
   border-top: 1px dashed var(--card-border);
   font-size: 0.95rem;
   color: var(--text-muted);
 }
 .citation-box {
   background: #0f172a;
   border: 1px solid var(--card-border);
   border-radius: 6px;
   padding: 0.75rem;
   margin-top: 0.5rem;
 }
 .citation-head {
   display: flex;
   justify-content: space-between;
   align-items: center;
   gap: 0.5rem;
   flex-wrap: wrap;
   margin-bottom: 0.3rem;
 }
 .citation-title { font-weight: 600; color: var(--text-primary); }
 .citation-auth { font-size: 0.84rem; color: var(--accent-primary); }
 .citation-link { color: var(--accent-primary); text-decoration: none; font-size: 0.84rem; }
 .citation-link:hover { text-decoration: underline; }
 .citation-passage { font-style: italic; color: var(--text-secondary); font-size: 0.92rem; }

 .fix-bundle-card {
   border-color: var(--accent-primary);
 }
 .tab-buttons {
   display: flex;
   gap: 0.5rem;
   margin-bottom: 1rem;
   border-bottom: 1px solid var(--card-border);
   padding-bottom: 0.5rem;
 }
 .tab-btn {
   background: transparent;
   border: none;
   color: var(--text-secondary);
   padding: 0.4rem 0.8rem;
   font-size: 1.0rem;
   font-weight: 500;
   cursor: pointer;
   border-radius: 4px;
 }
 .tab-btn.active {
   background: var(--accent-primary);
   color: #fff;
 }
 .fix-tab-content { display: none; }
 .fix-tab-content.active { display: block; }
 pre {
   background: #070a11;
   padding: 1rem;
   border-radius: 6px;
   overflow-x: auto;
   font-family: monospace;
   font-size: 0.95rem;
   color: #e2e8f0;
   border: 1px solid var(--card-border);
 }
 .remediation-notes {
   margin-top: 1rem;
   font-size: 0.98rem;
   color: var(--text-secondary);
 }
 .remediation-notes ul {
   margin-left: 1.2rem;
   margin-top: 0.3rem;
 }

 /* Audit Progress Bar Styles */
 .progress-card {
   display: block;
   background: #0f172a;
   border: 1px solid var(--accent-primary);
   border-radius: var(--radius);
   padding: 1.5rem;
   margin-bottom: 1.5rem;
   box-shadow: 0 0 25px rgba(59, 130, 246, 0.25);
   animation: fadeIn 0.3s ease-in-out;
 }
 @keyframes fadeIn {
   from { opacity: 0; transform: translateY(-10px); }
   to { opacity: 1; transform: translateY(0); }
 }
 .progress-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 0.8rem;
   flex-wrap: wrap;
   gap: 0.5rem;
 }
 .progress-title-group {
   display: flex;
   align-items: center;
   gap: 0.75rem;
 }
 .progress-spinner {
   width: 22px;
   height: 22px;
   border: 3px solid rgba(59, 130, 246, 0.25);
   border-top-color: var(--accent-primary);
   border-radius: 50%;
   animation: spin 0.8s linear infinite;
 }
 @keyframes spin {
   to { transform: rotate(360deg); }
 }
 .progress-percent {
   font-size: 2rem;
   font-weight: 700;
   color: var(--accent-primary);
   font-variant-numeric: tabular-nums;
 }
 .progress-bar-track {
   width: 100%;
   height: 12px;
   background: #1e293b;
   border-radius: 20px;
   overflow: hidden;
   margin-bottom: 1.25rem;
   border: 1px solid var(--card-border);
 }
 .progress-bar-fill {
   height: 100%;
   width: 0%;
   background: linear-gradient(90deg, #3b82f6 0%, #6366f1 50%, #10b981 100%);
   border-radius: 20px;
   transition: width 0.15s linear;
   box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
 }
 .progress-steps-list {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
   gap: 0.6rem;
   margin-top: 1rem;
   padding-top: 1rem;
   border-top: 1px dashed var(--card-border);
   font-size: 0.93rem;
 }
 .step-item {
   display: flex;
   align-items: center;
   gap: 0.4rem;
   color: var(--text-muted);
   transition: color 0.3s ease;
 }
 .step-item.active {
   color: var(--accent-primary);
   font-weight: 600;
 }
 .step-item.completed {
   color: var(--sev-info);
   font-weight: 500;
 }
 .step-badge {
   width: 18px;
   height: 18px;
   border-radius: 50%;
   background: #1e293b;
   border: 1px solid var(--card-border);
   display: inline-flex;
   align-items: center;
   justify-content: center;
   font-size: 0.78rem;
 }
 .step-item.completed .step-badge {
   background: var(--sev-info);
   color: #000;
   border-color: var(--sev-info);
 }

 footer {
   margin-top: 3rem;
   text-align: center;
   color: var(--text-muted);
   font-size: 0.89rem;
   border-top: 1px solid var(--card-border);
   padding-top: 1.5rem;
 }