/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #632CA6;
    --secondary-color: #D82D7E;
    --accent-color: #9D4EDD;
    --accent-purple: #9D4EDD;
    --accent-blue: #00A8E8;
    --danger-color: #FF5959;
    --success-color: #00D9A3;
    --warning-color: #FFB800;
}

/* Dark theme (default) */
html {
    --background: #0B0B0F;
    --background-elevated: #13131A;
    --card-background: #1A1A24;
    --card-hover: #212130;
    --text-primary: #E4E4E8;
    --text-secondary: #9B9BA7;
    --text-muted: #6C6C7D;
    --border-color: #2B2B3A;
    --border-subtle: #1F1F2E;
    --header-bg: #13131A;
    --accent-color: #9D4EDD;  /* Vibrant purple for dark mode */

    /* Shadows for dark mode */
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.7);
    --glow-purple: 0 0 20px rgba(99, 44, 166, 0.3);

    /* Prevent layout shift from scrollbar appearing/disappearing */
    scrollbar-gutter: stable;
}

/* Light theme */
html.light-theme {
    --background: #F9F9FB;
    --background-elevated: #FFFFFF;
    --card-background: #FFFFFF;
    --card-hover: #F5F5F7;
    --text-primary: #1D1D3F;
    --text-secondary: #6C6C7D;
    --text-muted: #9B9BA7;
    --border-color: #E4E4E8;
    --border-subtle: #F0F0F2;
    --header-bg: #FFFFFF;

    /* Override accent color to dark navy blue in light mode */
    --accent-color: #1A3A52;
    --accent-blue: #1A3A52;

    /* Shadows for light mode */
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.16);
    --glow-purple: 0 0 20px rgba(99, 44, 166, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

main.container {
    padding: 0;
    margin: 5px auto 20px;
}

/* Make main content grow to push footer to bottom */
main {
    flex: 1;
}

/* Header - Condensed Horizontal Navigation */
header {
    background: var(--header-bg);
    color: var(--text-primary);
    padding: 0;
    box-shadow: var(--shadow-lg);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s, color 0.3s;
    overflow: hidden;
}

/* Header Background Pattern Options - Uncomment one to use */

/* Option 1: Subtle network graph pattern (Uncomment to use)
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.03;
    background-image:
        radial-gradient(circle at 20% 30%, var(--accent-color) 2px, transparent 2px),
        radial-gradient(circle at 60% 70%, var(--accent-color) 2px, transparent 2px),
        radial-gradient(circle at 40% 60%, var(--accent-color) 2px, transparent 2px),
        radial-gradient(circle at 80% 40%, var(--accent-color) 2px, transparent 2px),
        radial-gradient(circle at 15% 80%, var(--accent-color) 2px, transparent 2px),
        radial-gradient(circle at 70% 20%, var(--accent-color) 2px, transparent 2px),
        radial-gradient(circle at 90% 85%, var(--accent-color) 2px, transparent 2px),
        radial-gradient(circle at 35% 15%, var(--accent-color) 2px, transparent 2px),
        linear-gradient(135deg, transparent 48%, var(--accent-color) 49%, var(--accent-color) 51%, transparent 52%),
        linear-gradient(45deg, transparent 48%, var(--accent-color) 49%, var(--accent-color) 51%, transparent 52%),
        linear-gradient(75deg, transparent 48%, var(--accent-color) 49%, var(--accent-color) 51%, transparent 52%);
    background-size: 400px 300px, 400px 300px, 400px 300px, 400px 300px,
                     400px 300px, 400px 300px, 400px 300px, 400px 300px,
                     400px 300px, 400px 300px, 400px 300px;
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0,
                         80px 90px, 240px 210px, 160px 45px;
    z-index: 0;
}

html.light-theme header::before {
    opacity: 0.05;
}
*/

/* Ensure header content is above the pattern */
header .container {
    position: relative;
    z-index: 1;
}

/* Option 2: Dotted grid with connecting lines (Uncomment to use)
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.04;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 49px, var(--accent-color) 49px, var(--accent-color) 50px),
        repeating-linear-gradient(90deg, transparent, transparent 49px, var(--accent-color) 49px, var(--accent-color) 50px),
        radial-gradient(circle at 0 0, var(--accent-color) 3px, transparent 3px),
        radial-gradient(circle at 50px 0, var(--accent-color) 3px, transparent 3px),
        radial-gradient(circle at 0 50px, var(--accent-color) 3px, transparent 3px),
        radial-gradient(circle at 50px 50px, var(--accent-color) 3px, transparent 3px);
    background-size: 50px 50px, 50px 50px, 50px 50px, 50px 50px, 50px 50px, 50px 50px;
    z-index: 0;
}

html.light-theme header::before {
    opacity: 0.06;
}
*/

/* Option 3: Directed graph arrows */
/* header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.025;
    background-image:
        linear-gradient(45deg, transparent 40%, var(--accent-color) 40%, var(--accent-color) 42%, transparent 42%, transparent 48%, var(--accent-color) 48%, var(--accent-color) 52%, transparent 52%, transparent 58%, var(--accent-color) 58%, var(--accent-color) 60%, transparent 60%),
        linear-gradient(135deg, transparent 40%, var(--accent-color) 40%, var(--accent-color) 42%, transparent 42%, transparent 48%, var(--accent-color) 48%, var(--accent-color) 52%, transparent 52%, transparent 58%, var(--accent-color) 58%, var(--accent-color) 60%, transparent 60%),
        radial-gradient(circle at 50% 50%, var(--accent-color) 4px, transparent 4px);
    background-size: 120px 120px, 120px 120px, 120px 120px;
    background-position: 0 0, 60px 0, 30px 60px;
    z-index: 0;
}

html.light-theme header::before {
    opacity: 0.04;
} */

/* Option 4: Hexagonal mesh (Uncomment to use)
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.03;
    background-image:
        linear-gradient(30deg, transparent 45%, var(--accent-color) 45%, var(--accent-color) 55%, transparent 55%),
        linear-gradient(150deg, transparent 45%, var(--accent-color) 45%, var(--accent-color) 55%, transparent 55%),
        linear-gradient(90deg, transparent 45%, var(--accent-color) 45%, var(--accent-color) 55%, transparent 55%);
    background-size: 60px 104px, 60px 104px, 60px 104px;
    background-position: 0 0, 30px 52px, 30px 0;
    z-index: 0;
}

html.light-theme header::before {
    opacity: 0.05;
}
*/

/* Option 5: Attack path tree structure (Uncomment to use)
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.035;
    background-image:
        radial-gradient(circle at 50% 10%, var(--accent-color) 4px, transparent 4px),
        radial-gradient(circle at 30% 40%, var(--accent-color) 3px, transparent 3px),
        radial-gradient(circle at 70% 40%, var(--accent-color) 3px, transparent 3px),
        radial-gradient(circle at 20% 70%, var(--accent-color) 2px, transparent 2px),
        radial-gradient(circle at 40% 70%, var(--accent-color) 2px, transparent 2px),
        radial-gradient(circle at 60% 70%, var(--accent-color) 2px, transparent 2px),
        radial-gradient(circle at 80% 70%, var(--accent-color) 2px, transparent 2px),
        linear-gradient(155deg, transparent 49%, var(--accent-color) 49%, var(--accent-color) 51%, transparent 51%),
        linear-gradient(25deg, transparent 49%, var(--accent-color) 49%, var(--accent-color) 51%, transparent 51%);
    background-size: 200px 200px;
    background-position: 0 0;
    z-index: 0;
}

html.light-theme header::before {
    opacity: 0.05;
}


header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.7;
}

/* Light theme header adjustments */
html.light-theme header {
    color: var(--text-primary);
}

html.light-theme header h1,
html.light-theme .tagline,
html.light-theme .powered-by,
html.light-theme .header-stat-number,
html.light-theme .header-stat-label {
    color: var(--text-primary);
}

html.light-theme .datadog-logo {
    filter: brightness(0) saturate(100%);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    flex-wrap: nowrap;
    gap: 20px;
}

/* Header Left - Logo and Site Name */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.site-branding {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.2;
}

.site-name:hover {
    color: var(--accent-color);
}

.site-tagline {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.3;
    white-space: normal;
    max-width: 400px;
}

/* Header Center - Navigation Links (hidden, using hamburger menu instead) */
.header-center {
    display: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(157, 78, 221, 0.1);
}

.nav-link.active {
    color: var(--accent-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Legacy styles for backward compatibility */
.header-content > div:first-child {
    text-align: left;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 0;
    font-weight: 700;
}

.tagline {
    font-size: 1.2em;
    opacity: 0.9;
    margin-top: 10px;
}

.powered-by {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
    font-size: 0.85em;
    padding: 6px 12px;
    background: rgba(157, 78, 221, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(157, 78, 221, 0.3);
}

.datadog-logo {
    height: 24px;
    width: auto;
    filter: brightness(0) invert(1);
}

.powered-by span {
    font-weight: 500;
    white-space: nowrap;
}

/* Header Right - Theme Toggle and GitHub */
.header-right {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.header-left-stack {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.github-actions-stack {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.github-link,
.pathfinder-link,
.security-labs-link {
    display: flex;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    padding: 8px;
    border-radius: 6px;
}

.github-link:hover,
.pathfinder-link:hover,
.security-labs-link:hover {
    color: var(--accent-color);
    background: rgba(157, 78, 221, 0.1);
}

.github-link svg,
.pathfinder-link svg,
.security-labs-link svg {
    flex-shrink: 0;
}

/* Icon labels - hidden by default, shown on hover */
.icon-label {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-background);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1000;
}

.datadog-logo-link,
.theme-toggle,
.github-link {
    position: relative;
}

.datadog-logo-link:hover .icon-label,
.theme-toggle:hover .icon-label,
.github-link:hover .icon-label {
    opacity: 1;
}

.github-stats {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: auto;
}

.github-badge {
    height: 20px;
    display: block;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.theme-toggle:hover {
    color: var(--accent-color);
    background: rgba(157, 78, 221, 0.1);
}

.theme-toggle .sun-icon {
    display: none;
    flex-shrink: 0;
}

.theme-toggle .moon-icon {
    display: block;
    flex-shrink: 0;
}

.theme-toggle .theme-text {
    display: none;
}

html.light-theme .theme-toggle {
    color: var(--text-primary);
}

html.light-theme .theme-toggle:hover {
    color: var(--accent-color);
    background: rgba(157, 78, 221, 0.1);
}

html.light-theme .theme-toggle .sun-icon {
    display: block;
}

html.light-theme .theme-toggle .moon-icon {
    display: none;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: block;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    margin-right: 12px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    color: var(--accent-color);
}

/* Datadog Logo Link */
.datadog-logo-link {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.datadog-logo-link:hover {
    background: rgba(157, 78, 221, 0.1);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: var(--card-background);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.mobile-menu-overlay.active .mobile-menu {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid var(--border-color);
    background: var(--header-bg);
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.mobile-menu-close:hover {
    color: var(--accent-color);
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
}

.mobile-nav-link {
    display: block;
    padding: 16px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    border-left: 4px solid transparent;
}

.mobile-nav-link:hover {
    background: var(--card-hover);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
}

/* Mobile menu hierarchy */
.mobile-nav-group {
    display: flex;
    flex-direction: column;
}

.mobile-nav-parent {
    display: block;
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    border-left: 4px solid transparent;
    cursor: default;
}

.mobile-nav-child {
    padding-left: 40px;
    font-weight: 400;
    font-size: 15px;
}

.mobile-nav-disabled {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 500;
    opacity: 0.5;
    cursor: not-allowed;
    border-left: 4px solid transparent;
}

.mobile-nav-badge {
    background: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile menu toggle is now shown on all screen sizes */

.header-stats {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

html.light-theme .header-stats {
    background: var(--card-background);
    border-color: var(--border-color);
}

/* Light theme uses same simplified icon styles */

.header-stat-number {
    font-size: 1.5em;
    font-weight: 700;
    line-height: 1;
}

html.light-theme .header-stat-number {
    color: var(--accent-color);
}

.header-stat-label {
    font-size: 0.85em;
    font-weight: 500;
    opacity: 0.9;
}

/* Navigation and Filters */
nav.container {
    background: var(--card-background);
    width:100%;
    padding: 30px 0 !important;
    margin: 20px auto 10px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.search-bar-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 0 30px;
}

.search-bar {
    flex: 1;
}

.search-bar input {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s;
    background: var(--background-elevated);
    color: var(--text-primary);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--card-background);
    box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.15), inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.paths-count-display {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    font-weight: 500;
    margin-left: auto;
}

.paths-count-display span {
    color: var(--accent-color);
    font-weight: 700;
}

.filters {
    display: flex;
    gap: 12px; /* Reduced from 20px */
    flex-wrap: wrap;
    align-items: center;
    padding: 0 30px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px; /* Reduced from 10px */
}

.filter-group label {
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75em; /* Reduced from 0.85em */
    letter-spacing: 0.3px; /* Reduced from 0.5px */
}

.filter-group select {
    padding: 6px 8px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    background: var(--background-elevated);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
    width: 130px; /* Default width */
}

/* Specific widths for different selects */
#category-filter {
    width: 150px; /* Increased for "Existing PassRole" */
}

#service-filter {
    width: 140px; /* Increased more for service names */
}

#detection-filter {
    width: 140px; /* Increased for "Cloudsplaining" */
}

#lineage-filter {
    width: 120px; /* Increased for "Variants Only" */
}

.filter-group select:hover {
    border-color: var(--accent-color);
    background: var(--card-hover);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.15);
}

.filter-group button {
    padding: 6px 12px; /* Reduced from 8px 16px */
    background: var(--accent-color);
    color: var(--background);
    border: none;
    border-radius: 6px; /* Reduced from 8px */
    font-weight: 600;
    font-size: 13px; /* Reduced to match selects */
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(157, 78, 221, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.3px; /* Reduced from 0.5px */
}

.filter-group button:hover {
    background: var(--accent-purple);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(157, 78, 221, 0.4);
}

/* View Toggle Buttons */
.view-toggle {
    margin-left: auto;
}

.view-button {
    padding: 6px 12px !important; /* Reduced from 8px 16px */
    background: var(--background-elevated) !important;
    color: var(--text-secondary) !important;
    border: 2px solid var(--border-color) !important;
    font-weight: 500 !important;
    font-size: 13px !important; /* Added to match other controls */
    margin-left: 0 !important;
    transition: all 0.3s !important;
}

.view-button:first-of-type {
    border-radius: 6px 0 0 6px !important; /* Reduced from 8px */
    border-right: 1px solid var(--border-color) !important;
}

.view-button:last-of-type {
    border-radius: 0 6px 6px 0 !important; /* Reduced from 8px */
    border-left: 1px solid var(--border-color) !important;
}

.view-button:hover {
    background: var(--card-hover) !important;
    color: var(--text-primary) !important;
}

.view-button.active {
    background: var(--accent-color) !important;
    color: var(--background) !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.3) !important;
}

/* Tagline Options - Testing Different Styles */
.option-label {
    display: inline-block;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
    font-size: 0.9em;
}

/* OPTION 2: Info banner with icon */
.tagline-option-2 {
    margin: 10px auto;
}

.tagline-info-banner {
    background: var(--background-elevated);
    border: 2px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    border-radius: 8px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95em;
    color: var(--text-secondary);
}

.info-icon {
    font-size: 1.3em;
    flex-shrink: 0;
}

/* OPTION 3: Subtle gradient bar */
.tagline-option-3 {
    margin: 10px auto;
}

.tagline-gradient-bar {
    background: linear-gradient(to right,
        rgba(157, 78, 221, 0.1),
        rgba(157, 78, 221, 0.05),
        rgba(157, 78, 221, 0.1));
    border-radius: 8px;
    padding: 10px 24px;
    text-align: center;
    font-size: 0.95em;
    color: var(--text-secondary);
    border-top: 2px solid rgba(157, 78, 221, 0.3);
    border-bottom: 2px solid rgba(157, 78, 221, 0.3);
}

/* OPTION 4: Minimal with border accent */
.tagline-option-4 {
    margin: 10px auto;
}

.tagline-minimal {
    text-align: center;
    font-size: 0.95em;
    color: var(--text-secondary);
    font-style: italic;
    padding: 8px 24px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.tagline-minimal::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--accent-color);
}

/* OPTION 5: Badge style (compact pill) */
.tagline-option-5 {
    margin: 10px auto;
    text-align: center;
}

.tagline-badge-container {
    display: inline-block;
}

.tagline-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    background: var(--card-background);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.tagline-badge:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.3);
}

/* OPTION 6: Path ID pill style with blue colors */
.tagline-option-6 {
    margin: 0 auto 10px;
    padding: 0 0px !important;
    max-width: 1400px;
}

.tagline-path-pill {
    display: block;
    width: 100%;
    background: rgba(26, 58, 82, 0.15);
    color: #1A3A52;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    border: 1px solid rgba(26, 58, 82, 0.3);
    box-shadow: 0 2px 6px rgba(26, 58, 82, 0.15);
    text-align: center;
}

.tagline-path-pill a {
    color: #1A3A52;
    text-decoration: underline;
    font-weight: 700;
    transition: opacity 0.2s;
}

.tagline-path-pill a:hover {
    opacity: 0.7;
}

html.light-theme .tagline-path-pill {
    background: rgba(26, 58, 82, 0.1);
    color: #1A3A52;
    border-color: rgba(26, 58, 82, 0.25);
}

/* Stats */
.stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    flex: 1;
    background: var(--card-background);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-xl), 0 0 20px rgba(157, 78, 221, 0.2);
}

.stat-number {
    display: block;
    font-size: 2.5em;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
    text-shadow: 0 0 20px rgba(157, 78, 221, 0.3);
}

html.light-theme .stat-number {
    text-shadow: none;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Paths Grid */
.paths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.path-card {
    background: var(--card-background);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-color);
}

.path-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl), 0 0 20px rgba(157, 78, 221, 0.2);
    border-left-color: var(--accent-purple);
    border-color: var(--border-color);
    background: var(--card-hover);
}

.path-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.path-id {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-purple));
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(99, 44, 166, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.path-name {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Table View */
#paths-container {
    width: 100%;
}

.paths-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-background);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.paths-table thead {
    background: var(--background-elevated);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid var(--accent-color);
}

html.light-theme .paths-table thead {
    background: linear-gradient(135deg, #1A3A52 0%, #0F2A3F 100%);
    color: white;
}

.paths-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.paths-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.paths-table th.sortable:hover {
    background: rgba(255, 255, 255, 0.1);
}

.paths-table th.sortable .sort-icon {
    margin-left: 5px;
    font-size: 0.9em;
    opacity: 0.6;
}

.paths-table th.sortable.sorted .sort-icon {
    opacity: 1;
}

.paths-table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.3s;
}

.paths-table tbody tr:hover {
    background: var(--card-hover);
    border-left: 3px solid var(--accent-color);
}

.paths-table tbody tr:last-child {
    border-bottom: none;
}

.paths-table td {
    padding: 15px;
    vertical-align: top;
}

.paths-table .table-id-cell {
    vertical-align: top;
    width: 240px;
    max-width: 240px;
}

.paths-table .table-id {
    display: inline-block;
    background: rgba(157, 78, 221, 0.15);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(157, 78, 221, 0.3);
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.2);
    margin-bottom: 6px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

html.light-theme .paths-table .table-id {
    background: rgba(157, 78, 221, 0.1);
    color: #7B2CBF;
    border: 1px solid rgba(157, 78, 221, 0.25);
}

.paths-table .table-services {
    display: none;
    gap: 3px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.paths-table .table-name {
    font-family: 'Courier New', monospace;
    font-weight: 500;
    color: var(--text-primary);
}

.paths-table .table-category {
    width: 190px;
}

.paths-table .service-tag {
    font-size: 0.7em;
    padding: 2px 6px;
}

/* Detection tool circles */
.paths-table .table-detection {
    text-align: right;
    padding-right: 20px;
    width: 180px;
}

.detection-tool-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    font-size: 0.65em;
    font-weight: 700;
    margin-left: 2px;
    margin-bottom: 5px;
    cursor: help;
    border: 2px solid var(--border-color);
    transition: all 0.2s;
}

.detection-tool-circle:hover {
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.3);
    z-index: 10;
}

html.light-theme .detection-tool-circle {
    background: var(--accent-blue);
    border-color: var(--border-color);
}

/* Instant tooltip for detection circles */
.detection-tooltip {
    position: fixed;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.85em;
    color: var(--text-color);
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0s; /* Instant appearance */
}

.detection-tooltip.visible {
    opacity: 1;
}

html.light-theme .detection-tooltip {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.no-detection {
    color: var(--text-muted);
    font-size: 1.2em;
}

.paths-table td:last-child {
}

.path-category {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 10px;
    cursor: help;
    width: 150px;
    text-align: center;
    box-sizing: border-box;
}

.category-self-escalation {
    background: rgba(255, 184, 0, 0.15);
    color: #FFB800;
    border: 1px solid rgba(255, 184, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 184, 0, 0.2);
}

.category-principal-access {
    background: rgba(0, 168, 232, 0.15);
    color: #00A8E8;
    border: 1px solid rgba(0, 168, 232, 0.3);
    box-shadow: 0 0 10px rgba(0, 168, 232, 0.2);
}

.category-new-passrole {
    background: rgba(255, 89, 89, 0.15);
    color: #FF5959;
    border: 1px solid rgba(255, 89, 89, 0.3);
    box-shadow: 0 0 10px rgba(255, 89, 89, 0.2);
}

.category-credential-access {
    background: rgba(0, 217, 163, 0.15);
    color: #00D9A3;
    border: 1px solid rgba(0, 217, 163, 0.3);
    box-shadow: 0 0 10px rgba(0, 217, 163, 0.2);
}

.category-existing-passrole {
    background: rgba(0, 217, 196, 0.15);
    color: #00D9C4;
    border: 1px solid rgba(0, 217, 196, 0.3);
    box-shadow: 0 0 10px rgba(0, 217, 196, 0.2);
}

.path-services {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.service-tag {
    background: rgba(157, 78, 221, 0.2);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75em;
    font-weight: 600;
    border: 1px solid rgba(157, 78, 221, 0.3);
    box-shadow: 0 0 8px rgba(157, 78, 221, 0.2);
}

html.light-theme .service-tag {
    background: rgba(26, 58, 82, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(26, 58, 82, 0.3);
    box-shadow: none;
}

.path-description {
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 1.1em;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-results p {
    font-size: 1.2em;
    margin-bottom: 10px;
}

/* Detail View */
#detail-view {
    width: 100%;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#detail-content {
    padding: 0;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.2s;
}

.breadcrumb a:hover {
    color: var(--accent-purple);
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Detail Title */
/* Sticky header for detail view - breadcrumb only */
.detail-sticky-header {
    position: sticky;
    top: 62px; /* Position below the main header (62px height) */
    z-index: 100;
    background: var(--header-bg); /* Match the solid header background */
    padding: 20px 0 15px 0;
    margin: 0;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

.detail-sticky-header .breadcrumb {
    margin-bottom: 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.detail-scrollable-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px 20px 20px 20px;
}

.detail-title {
    color: var(--accent-color);
    margin-bottom: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    text-shadow: 0 0 20px rgba(157, 78, 221, 0.3);
    font-size: 2em;
}

html.light-theme .detail-title {
    text-shadow: none;
}

#detail-content h2 {
    color: var(--accent-color);
    margin-bottom: 20px;
    margin-top: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    text-shadow: 0 0 20px rgba(157, 78, 221, 0.3);
    font-size: 1.5em;
}

html.light-theme #detail-content h2 {
    text-shadow: none;
}

/* GitHub-style Anchor Links for Headings */
.heading-with-anchor {
    position: relative;
    /* Add scroll margin so heading is visible when scrolling to anchor */
    /* Header height (60px) + extra padding (20px) */
    scroll-margin-top: 80px;
}

.heading-anchor {
    position: absolute;
    left: -24px;
    padding-right: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    color: var(--text-muted);
    text-decoration: none;
}

.heading-anchor:hover {
    color: var(--accent-color);
}

.heading-with-anchor:hover .heading-anchor {
    opacity: 1;
}

/* Ensure headings have space for the anchor link */
#detail-content .heading-with-anchor {
    margin-left: 0;
    padding-left: 0;
}

/* Mobile: hide anchor links since hover doesn't work well */
@media (max-width: 768px) {
    .heading-anchor {
        display: none;
    }
}

/* Detail Top Metadata Bar */
.detail-top-metadata {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--background-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-right: 1px solid var(--border-color);
    flex: 1;
    min-width: 0;
}

.metadata-item:last-child {
    border-right: none;
}

.metadata-label {
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.metadata-value {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.metadata-id {
    display: inline-block;
    background: rgba(157, 78, 221, 0.15);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(157, 78, 221, 0.3);
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.2);
}

html.light-theme .metadata-id {
    background: rgba(157, 78, 221, 0.1);
    color: #7B2CBF;
    border: 1px solid rgba(157, 78, 221, 0.25);
}

.detail-top-metadata .service-tag {
    margin: 0;
}

.detail-top-metadata .path-category {
    margin: 0;
}

#detail-content h3 {
    color: var(--text-primary);
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.3em;
}

#detail-content .detail-section {
    margin-bottom: 35px;
}

#detail-content pre {
    background: var(--background-elevated);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    border-left: 3px solid var(--accent-color);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-color);
    color: var(--text-primary);
}

html.light-theme #detail-content pre {
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent-color);
}

#detail-content code {
    background: var(--background-elevated);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #FFFFFF;
}

html.light-theme #detail-content code {
    color: var(--accent-color);
}

/* Remove padding from code elements inside pre tags to avoid double padding */
#detail-content pre code {
    padding: 0;
}

#detail-content ul {
    margin-left: 20px;
    margin-top: 10px;
}

#detail-content li {
    margin-bottom: 8px;
}

#detail-content a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

#detail-content a:hover {
    border-bottom-color: var(--accent-color);
}

.step-item {
    background: var(--background-elevated);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--accent-purple);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.step-item:hover {
    border-left-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.15);
}

.step-header {
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.step-number {
    font-weight: 700;
    color: var(--accent-color);
    display: inline;
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.3);
}

html.light-theme .step-number {
    text-shadow: none;
}

/* Learning Environments */
.learning-env-content {
    padding: 0;
}

.env-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}


.env-scenario-name {
    font-size: 0.9em;
    color: var(--text-muted);
}

.env-scenario-name code {
    background: var(--code-background);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.pricing-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
}

.pricing-badge.paid {
    background: #FF9800;
    color: white;
}

.pricing-badge.free {
    background: var(--success-color);
    color: white;
}

.env-description {
    margin: 0 0 15px 0;
    color: var(--text-muted);
    font-size: 0.95em;
    line-height: 1.6;
}

.env-scenario-link {
    margin: 15px 0 0 0;
}

.env-scenario-link a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 600;
}

.env-scenario-link a:hover {
    text-decoration: underline;
}

.env-steps-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.env-steps-container h4 {
    margin: 0 0 15px 0;
    font-size: 1em;
    color: var(--text-color);
}

html.light-theme .env-description {
    color: #666;
}

/* Detection Tool Content */
.detection-tool-content {
    padding: 0;
}

.tool-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}


.tool-description {
    margin: 0 0 15px 0;
    color: var(--text-muted);
    font-size: 0.95em;
    line-height: 1.6;
}

html.light-theme .tool-description {
    color: #666;
}

/* Attack Visualization (vis.js) */
.attack-viz-container {
    background: var(--card-background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 15px;
    width: 100%;
    height: 700px;
    position: relative;
    transition: background 0.3s;
}

/* Visualization Legend */
.viz-legend {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 12px;
    z-index: 10;
    box-shadow: var(--shadow);
    font-size: 13px;
    pointer-events: auto;
    transition: background 0.3s;
}

.viz-legend-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.viz-legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.viz-legend-item:last-child {
    margin-bottom: 0;
}

.viz-legend-item span {
    line-height: 1;
}

.viz-legend-section {
    margin-bottom: 12px;
}

.viz-legend-section:last-child {
    margin-bottom: 0;
}

.viz-legend-subtitle {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.viz-legend-box {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 8px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

/* Visualization Tooltip */
.viz-tooltip {
    position: absolute;
    background: var(--card-background);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 0;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    z-index: 1100;
    font-size: 14px;
    transition: background 0.3s;
}

.viz-tooltip-header {
    background: var(--accent-color);
    color: white;
    padding: 10px 15px;
    font-weight: 700;
    border-radius: 6px 6px 0 0;
    cursor: grab;
    user-select: none;
}

html.light-theme .viz-tooltip-header {
    color: white;
}

.viz-tooltip-body {
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.5;
    color: var(--text-primary);
}

.viz-tooltip-body code {
    background: var(--background-elevated);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #FFFFFF;
}

html.light-theme .viz-tooltip-body code {
    color: var(--accent-color);
}

.viz-tooltip-close {
    position: absolute;
    top: 8px;
    right: 10px;
    cursor: pointer;
    color: white;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.viz-tooltip-close:hover {
    color: #ffcccc;
}

/* Fullscreen Visualization Button */
.fullscreen-viz-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s;
    vertical-align: middle;
}

.fullscreen-viz-btn:hover {
    background: var(--secondary-color);
}

.fullscreen-viz-btn svg {
    vertical-align: middle;
}

/* Fullscreen Visualization Modal */
.fullscreen-viz-modal {
    display: block;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s;
}

.fullscreen-viz-content {
    background: white;
    margin: 2% auto;
    padding: 0;
    width: 95%;
    height: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.fullscreen-viz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid var(--accent-color);
    background: var(--background-elevated);
    color: white;
    border-radius: 8px 8px 0 0;
}

.fullscreen-viz-header h2 {
    margin: 0;
    font-size: 24px;
}

.fullscreen-viz-close {
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.3s;
}

.fullscreen-viz-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.fullscreen-viz-container {
    flex: 1;
    background: #ffffff;
    border-radius: 0 0 8px 8px;
    position: relative;
    margin: 20px;
    min-height: 600px;
    height: calc(100% - 120px);
}

/* Footer */
footer {
    background: var(--header-bg);
    color: var(--text-primary);
    padding: 30px 0;
    margin-top: auto;
    border-top: 2px solid var(--border-color);
    position: relative;
    transition: background 0.3s, color 0.3s;
}

footer::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.7;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-section {
    display: flex;
    align-items: center;
}

.footer-curator {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95em;
}

.footer-curator a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.footer-curator a:hover {
    color: var(--accent-purple);
    text-decoration: underline;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9em;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.footer-links a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.footer-separator {
    color: var(--text-muted);
    font-weight: 300;
}

html.light-theme footer a {
    font-weight: 500;
}

/* Tabs */
.tabs-container {
    margin-top: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-background);
}

/* Boxed section (similar to tabs-container but without tabs) */
.boxed-section {
    margin-top: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-background);
    padding: 20px;
}

/* Related Techniques Styling */
.related-technique-group {
    padding: 0;
}

.related-technique-group:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.related-technique-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 15px 0;
}

.related-techniques-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-technique-item {
    display: block;
}

.technique-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--background-elevated);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.technique-link:hover {
    background: var(--background-hover);
    border-color: var(--accent-color);
    transform: translateX(4px);
}

.technique-id {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-color);
    min-width: 80px;
}

.technique-name {
    color: var(--text-primary);
    font-size: 14px;
    flex: 1;
}

/* Parent and child modification explanations */
.parent-modification,
.child-modification {
    margin-top: 12px;
    padding: 12px;
    background: var(--background-elevated);
    border-left: 3px solid var(--accent-color);
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.parent-modification strong,
.child-modification strong {
    color: var(--accent-color);
    font-weight: 600;
}

.child-modification {
    margin-top: 8px;
    font-size: 12px;
    padding: 10px;
    border-left-color: var(--text-muted);
}

.tabs {
    display: flex;
    gap: 0;
    background: var(--background-elevated);
    border-bottom: 1px solid var(--border-color);
    margin: 0;
}

.tab-button {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-right: 1px solid var(--border-subtle);
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.3s;
    position: relative;
}

.tab-button:last-child {
    border-right: none;
}

.tab-button:hover {
    background: var(--card-hover);
    color: var(--text-primary);
}

.tab-button.active {
    background: var(--card-background);
    color: var(--accent-color);
    font-weight: 600;
    border-bottom: 2px solid var(--accent-color);
    margin-bottom: -1px;
    box-shadow: 0 -2px 8px rgba(157, 78, 221, 0.2);
}

.tabs-content {
    padding: 20px;
    background: var(--card-background);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.25s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Unique prerequisites styling */
.unique-prereq {
    font-weight: 600;
    color: var(--primary-color);
}

/* Permissions table */
.permissions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.95em;
}

.permissions-table thead {
    background: var(--background-elevated);
}

.permissions-table th {
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.permissions-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: top;
    color: var(--text-secondary);
}

.permissions-table tbody tr:last-child td {
    border-bottom: none;
}

.permissions-table tbody tr:hover {
    background: var(--background-elevated);
}

.permissions-table code {
    background: var(--background-elevated);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
    color: #FFFFFF;
}

html.light-theme .permissions-table code {
    color: var(--accent-color);
}

.permissions-table em {
    color: var(--text-muted);
}

.disclaimer {
    font-size: 0.9em;
    opacity: 0.9;
    margin-top: 20px !important;
}

/* Responsive - removed 1200px breakpoint to keep icons horizontal until mobile */

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    header {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        overflow-x: hidden;
    }

    .header-content {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        padding: 12px 20px;
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Hide navigation links on mobile */
    .header-center {
        display: none;
    }

    /* Adjust header left for mobile */
    .header-left {
        width: 100%;
    }

    .header-left .site-name {
        font-size: 16px;
    }

    .site-tagline {
        font-size: 11px;
        white-space: normal;
    }

    .container {
        max-width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    main.container {
        padding: 0 !important;
    }

    nav.container {
        padding: 20px 15px !important;
    }

    .search-bar-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 0 15px;
    }

    .search-bar {
        max-width: 100%;
    }

    .paths-count-display {
        text-align: center;
        font-size: 13px;
    }

    .title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .tagline {
        font-size: 1em;
    }

    .header-right {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 15px;
    }

    .header-left-stack {
        align-items: stretch;
    }

    .github-actions-stack {
        width: 100%;
    }

    .theme-toggle,
    .header-stats {
        width: auto;
        justify-content: center;
    }

    .github-link,
    .pathfinder-link,
    .security-labs-link {
        font-size: 0.8em;
        width: auto;
    }

    .github-link span:not(:first-child),
    .pathfinder-link span:not(:first-child),
    .security-labs-link span:not(:first-child) {
        display: none;
    }

    .theme-toggle .theme-text {
        display: none;
    }

    .tagline-option-6 {
        padding: 0 15px !important;
        box-sizing: border-box;
    }

    .tagline-path-pill {
        width: 100%;
        box-sizing: border-box;
    }

    .paths-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
        gap: 15px;
        box-sizing: border-box;
        width: 100vw;
        max-width: 100%;
    }

    .path-card {
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    /* Visualization tooltip for mobile */
    .viz-tooltip {
        max-width: calc(100vw - 20px);
        left: 10px !important;
        right: 10px !important;
        width: calc(100% - 20px);
    }

    /* Collapsible legend for mobile */
    .viz-legend {
        cursor: pointer;
        user-select: none;
    }

    .viz-legend-title::after {
        content: ' ▼';
        font-size: 10px;
        margin-left: 5px;
    }

    .viz-legend.collapsed .viz-legend-title::after {
        content: ' ▶';
    }

    .viz-legend.collapsed .viz-legend-section {
        display: none;
    }

    /* Table responsive container */
    #paths-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .paths-table {
        min-width: 800px;
        margin: 0 15px;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group select,
    .filter-group button,
    #category-filter,
    #service-filter,
    #detection-filter,
    #lineage-filter {
        width: 100% !important;
    }

    .stats {
        flex-direction: column;
    }

    /* Responsive detail view adjustments */
    #detail-content {
        padding: 0;
    }

    .detail-sticky-header {
        padding: 15px 0 12px 0;
        top: 110px; /* Adjust for taller mobile header */
    }

    .detail-sticky-header .breadcrumb {
        padding: 0 15px;
    }

    .detail-scrollable-content {
        padding: 20px 15px 15px 15px;
    }

    .detail-title {
        font-size: 1.2em; /* Smaller title on mobile */
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .breadcrumb {
        font-size: 0.85em;
    }

    .detail-top-metadata {
        flex-direction: column;
    }

    .metadata-item {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .metadata-item:last-child {
        border-bottom: none;
    }

    /* Footer responsive */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Permissions table mobile responsiveness */
    /* Make the tabs container and table wrapper scrollable horizontally */
    .tabs-container,
    .permissions-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    /* Always show scrollbar for permissions tables */
    .tabs-container::-webkit-scrollbar,
    .permissions-table-wrapper::-webkit-scrollbar,
    .tab-content::-webkit-scrollbar {
        height: 8px;
        -webkit-appearance: none;
    }

    .tabs-container::-webkit-scrollbar-track,
    .permissions-table-wrapper::-webkit-scrollbar-track,
    .tab-content::-webkit-scrollbar-track {
        background: var(--background-elevated);
        border-radius: 4px;
    }

    .tabs-container::-webkit-scrollbar-thumb,
    .permissions-table-wrapper::-webkit-scrollbar-thumb,
    .tab-content::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 4px;
    }

    .tabs-container::-webkit-scrollbar-thumb:hover,
    .permissions-table-wrapper::-webkit-scrollbar-thumb:hover,
    .tab-content::-webkit-scrollbar-thumb:hover {
        background: var(--accent-color);
    }

    /* Firefox scrollbar styling */
    .tabs-container,
    .permissions-table-wrapper,
    .tab-content {
        scrollbar-width: thin;
        scrollbar-color: var(--border-color) var(--background-elevated);
    }

    .permissions-table {
        min-width: 750px !important; /* Force table to be wider than mobile screen */
        width: 750px !important;
        table-layout: fixed;
    }

    .permissions-table th,
    .permissions-table td {
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        padding: 12px 15px;
    }

    .permissions-table th:first-child,
    .permissions-table td:first-child {
        width: 350px;
        min-width: 350px;
        white-space: nowrap; /* Prevent permission names from wrapping */
    }

    .permissions-table th:last-child,
    .permissions-table td:last-child {
        width: 400px;
        min-width: 400px;
    }

    /* Attribution cards mobile responsiveness */
    .attribution-cards {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        overflow-x: hidden;
    }

    .attribution-card {
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .attribution-card .card-header,
    .attribution-card .card-body {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .card-author,
    .card-context,
    .card-link,
    .card-path-link a {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
    }

    .card-link-container {
        overflow-x: hidden;
    }

    /* Ensure long URLs break properly */
    .attribution-card a {
        word-break: break-all;
        overflow-wrap: break-word;
    }

    /* Boxed sections mobile responsiveness */
    .boxed-section {
        padding: 15px;
        overflow-x: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .boxed-section ul,
    .boxed-section ol {
        padding-left: 20px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .boxed-section li {
        word-wrap: break-word;
        overflow-wrap: break-word;
        margin-bottom: 8px;
    }

    .boxed-section a {
        word-break: break-all;
        overflow-wrap: break-word;
    }

    /* Tabs container mobile responsiveness - removed conflicting overflow rule */

    .tab-content {
        padding: 15px;
        overflow-x: auto; /* Allow horizontal scrolling */
        -webkit-overflow-scrolling: touch;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Code blocks mobile responsiveness */
    pre, code {
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: pre-wrap;
        max-width: 100%;
    }

    .command-block {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Zoom Controls for Visualization */
.viz-zoom-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1000;
    pointer-events: auto;
}

.viz-zoom-btn {
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    width: 36px;
    height: 36px;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: var(--shadow);
    line-height: 1;
    padding: 0;
}

.viz-zoom-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.viz-zoom-btn:active {
    transform: scale(0.95);
}

.viz-zoom-reset {
    font-size: 18px;
}

/* Git Metadata Section - Boxed Style */
.git-metadata-section {
    /* No extra padding override needed, uses boxed-section padding */
}

.git-metadata-contributing {
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 15px;
}

.git-metadata-contributing a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.git-metadata-contributing a:hover {
    text-decoration: underline;
}

.git-metadata-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.git-metadata-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.git-metadata-dates {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.85em;
    color: var(--text-secondary);
}

.git-metadata-dates strong {
    color: var(--text-primary);
    font-weight: 600;
}

.edit-github-link,
.unified-action-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--accent-color);
    border: none;
    border-radius: 6px;
    color: #FFFFFF !important;
    text-decoration: none;
    font-size: 0.8em;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.edit-github-link:hover,
.unified-action-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    filter: brightness(1.1);
    color: #FFFFFF !important;
}

.edit-github-link svg,
.unified-action-button svg {
    width: 14px;
    height: 14px;
    fill: #FFFFFF;
    color: #FFFFFF;
}

.unified-action-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
}

.unified-action-button.disabled:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    filter: none;
}

.coming-soon-badge {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.git-metadata-contributors {
    display: flex;
    align-items: center;
    gap: 12px;
}

.git-metadata-contributors strong {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85em;
    white-space: nowrap;
}

.contributors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.contributor-link,
.contributor-no-link {
    display: inline-block;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid var(--border-color);
}

.contributor-link {
    cursor: pointer;
}

.contributor-link:hover {
    transform: scale(1.15);
    box-shadow: 0 0 0 3px var(--accent-color);
    border-color: var(--accent-color);
}

.contributor-avatar {
    width: 36px;
    height: 36px;
    display: block;
    border-radius: 50%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .git-metadata-header {
        flex-direction: column;
        align-items: stretch;
    }

    .edit-github-link {
        width: 100%;
        justify-content: center;
    }

    .git-metadata-contributors {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===================================
   Discovery Attribution Styles
   =================================== */

/* TABLE VIEW */
.attribution-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.95em;
    table-layout: fixed;
}

.attribution-table thead {
    background: var(--background-elevated);
    border-bottom: 2px solid var(--border-color);
}

.attribution-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.attribution-table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.2s;
}

.attribution-table tbody tr:hover {
    background: var(--card-hover);
}

.attribution-table td {
    padding: 16px;
    vertical-align: middle;
}

.attribution-table .attr-type {
    width: 145px;
    min-width: 145px;
    padding-right: 8px;
}

.attribution-table .attr-type-narrow {
    width: 110px;
    min-width: 110px;
    white-space: nowrap;
}

.attribution-table .th-narrow {
    width: 110px;
}

.attribution-table .attr-author {
    width: 30%;
    font-weight: 500;
    padding-left: 8px;
}

.attribution-table .attr-date {
    width: 100px;
    text-align: center;
    color: var(--text-secondary);
}

/* Align Year header with centered data */
.attribution-table th:nth-child(3) {
    text-align: center;
}

.attribution-table .attr-context {
    width: 35%;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.attribution-table .attr-link {
    width: 140px;
    text-align: right;
}

/* Align Source header with right-aligned data */
.attribution-table th:nth-child(5) {
    text-align: right;
}

.attribution-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.path-link-full {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
    display: block;
}

.path-link-full:hover {
    color: var(--accent-color);
}

.attribution-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Badge styles for table */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}

.badge-primary {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-derivative {
    background: rgba(251, 146, 60, 0.15);
    color: #FB923C;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.badge-origin {
    background: rgba(255, 185, 0, 0.15);
    color: #FFD666;
    border: 1px solid rgba(255, 185, 0, 0.3);
}

html.light-theme .badge-primary {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

html.light-theme .badge-derivative {
    background: rgba(251, 146, 60, 0.1);
    color: #EA580C;
    border: 1px solid rgba(251, 146, 60, 0.25);
}

/* Lineage badges for Primary/Variant */
.lineage-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.lineage-primary {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.lineage-variant {
    background: rgba(251, 146, 60, 0.15);
    color: #FB923C;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

html.light-theme .lineage-primary {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

html.light-theme .lineage-variant {
    background: rgba(251, 146, 60, 0.1);
    color: #EA580C;
    border: 1px solid rgba(251, 146, 60, 0.25);
}

/* CARD VIEW */
.attribution-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.attribution-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.attribution-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.attribution-card .card-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.attribution-card-primary .card-header {
    background: rgba(157, 78, 221, 0.1);
}

.attribution-card-derivative .card-header {
    background: rgba(0, 168, 232, 0.1);
}

.attribution-card-origin .card-header {
    background: rgba(255, 185, 0, 0.1);
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-primary);
}

.attribution-card-primary .card-badge {
    color: #B794F6;
}

.attribution-card-derivative .card-badge {
    color: #63C5F5;
}

.attribution-card-origin .card-badge {
    color: #FFD666;
}

.attribution-card .card-body {
    padding: 16px;
}

.card-author {
    font-size: 1.05em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.org-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--background-elevated);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 6px;
}

.card-path-link {
    margin-bottom: 12px;
}

.card-path-link a {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

.card-path-link a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.card-context {
    font-size: 0.95em;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 8px;
}

.card-link-container {
    margin-top: 12px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: opacity 0.2s;
}

.card-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Responsive adjustments for attribution */
@media (max-width: 768px) {
    /* Make attribution section scrollable horizontally */
    .boxed-section {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .attribution-table {
        min-width: 700px; /* Force table to be wider than mobile screen */
        font-size: 0.85em;
        white-space: normal; /* Allow text wrapping within cells */
    }

    .attribution-table th,
    .attribution-table td {
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Set minimum widths for columns */
    .attribution-table .attr-type {
        min-width: 140px;
    }

    .attribution-table .attr-author {
        min-width: 150px;
    }

    .attribution-table .attr-date {
        min-width: 70px;
    }

    .attribution-table .attr-context {
        min-width: 200px;
    }

    .attribution-table .attr-link {
        min-width: 120px;
    }

    /* Stack cards more compactly on mobile */
    .attribution-cards {
        gap: 12px;
    }

    .attribution-card .card-body {
        padding: 12px;
    }
}
