* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.4; color: #141414; background: linear-gradient(135deg, #ccd5ae 0%, #ccd5ae 100%); min-height: 100vh; }
.container { 
    max-width: 1800px; 
    margin: 0 auto; 
    padding: 24px; 
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.container.expanded { 
    grid-template-columns: 350px 1fr; /* Keep same layout when expanded */
}
.header { 
    text-align: center; 
    margin-bottom: 20px; 
    color: #283618; 
    width: 100%;
}
.header h1 {
    font-size: 2.5rem; 
    margin-bottom: 8px; 
}
.header p { 
    font-size: 1.1rem; 
    color: #606c38; 
}

/* Top Navigation Bar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #a4b494;
    padding: 16px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    outline: 1px solid rgba(40, 54, 24, 0.66);
    outline-offset: -1px;
}

.top-nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.selection-counter {
    font-size: 10px;
    font-weight: 400;
    color: rgba(10, 13, 6, 0.66);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-clear {
    padding: 8px;
    background: rgba(255, 255, 255, 0);
    border: 1px solid rgba(255, 255, 255, 0);
    border-radius: 2px;
    color: rgba(96, 108, 56, 0.33);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear:not(:disabled) {
    color: rgba(10, 13, 6, 0.66);
}

.btn-clear:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.1);
}

.top-nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.format-toggles {
    display: flex;
    align-items: center;
    gap: 20px;
}

.format-option {
    display: flex;
    align-items: center;
    gap: 2px;
}

.format-option input[type="radio"] {
    width: 10px;
    height: 10px;
    margin: 0;
    border-radius: 50%;
    border: 0.67px solid #606C38;
    background: #FEFAE0;
    cursor: pointer;
}

.format-option input[type="radio"]:checked {
    background: #606C38;
    border-color: #606C38;
}

.format-option input[type="radio"]:checked::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #FEFAE0;
    margin: 2px auto;
}

.format-option label {
    font-size: 10px;
    font-weight: 400;
    color: rgba(10, 13, 6, 0.66);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-action {
    padding: 8px;
    background: rgba(255, 255, 255, 0);
    border: 1px solid rgba(255, 255, 255, 0);
    border-radius: 2px;
    color: rgba(10, 13, 6, 0.66);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-action:disabled {
    color: rgba(96, 108, 56, 0.33);
    cursor: not-allowed;
}

.top-nav .search-container {
    margin-left: 16px;
}

.top-nav .search-container input {
    padding: 4px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 2px;
    font-size: 10px;
    color: rgba(10, 13, 6, 0.66);
    min-width: 179px;
}

.top-nav .search-container input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.1);
}

.top-nav .search-container input::placeholder {
    color: rgba(10, 13, 6, 0.66);
}

/* Desktop Navigation - Enhanced */
.desktop-nav {
    width: 100%;
    padding-left: 8px;
    padding-right: 8px;
    background: rgba(255, 255, 255, 0);
    border-radius: 2px;
    outline: 1px solid rgba(40, 54, 24, 0.66);
    outline-offset: -1px;
    align-items: center;
    display: flex;
    margin-bottom: 20px;
}

.nav-separator-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-separator {
    width: 1px;
    height: 24px;
    background: rgba(40, 54, 24, 0.66);
}

/* Selection Counter */
.desktop-nav .selection-counter {
    align-self: stretch;
    padding: 8px;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    display: flex;
}

.desktop-nav .count-badge {
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.05);
    background-blend-mode: multiply;
    border-radius: 2px;
    display: inline-block;
}

.desktop-nav .count-text {
    color: #283618;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400;
    word-wrap: break-word;
}

.desktop-nav .count-badge span {
    color: #283618;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400;
}

/* Clear Button */
.desktop-nav .btn-clear {
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: 4px;
    justify-content: center;
    align-items: center;
    gap: 2px;
    display: flex;
    color: rgba(96, 108, 56, 0.33);
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    line-height: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.desktop-nav .btn-clear:not(:disabled) {
    color: rgba(10, 13, 6, 0.66);
}

.desktop-nav .btn-clear:hover {
    outline: 1px solid #0A0D06;
    outline-offset: -1px;
}

/* Format Toggles */
.desktop-nav .format-toggles {
    padding: 8px;
    border-radius: 4px;
    justify-content: center;
    align-items: center;
    gap: 24px;
    display: flex;
}

.desktop-nav .format-toggles > div {
    align-self: stretch;
    justify-content: center;
    align-items: center;
    gap: 8px;
    display: flex;
}

.desktop-nav .format-option {
    justify-content: center;
    align-items: center;
    gap: 2px;
    display: flex;
}

.desktop-nav .radio-button {
    width: 14px;
    height: 14px;
    position: relative;
}

.desktop-nav .radio-outer {
    width: 14px;
    height: 14px;
    left: 0px;
    top: 0px;
    position: absolute;
    background: #FEFAE0;
    border-radius: 9999px;
    border: 1px solid rgba(96, 108, 56, 0.66);
}

.desktop-nav .radio-button.checked .radio-outer {
    border: 1px solid #606C38;
}

.desktop-nav .radio-inner {
    width: 6px;
    height: 6px;
    left: 4px;
    top: 4px;
    position: absolute;
    background: #606C38;
    border-radius: 9999px;
}

.desktop-nav .format-option label {
    opacity: 0.66;
    color: #0A0D06;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    line-height: 24px;
    letter-spacing: 0.30px;
    word-wrap: break-word;
    cursor: pointer;
}

/* Action Buttons */
.desktop-nav .btn-action {
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: 4px;
    justify-content: center;
    align-items: center;
    gap: 2px;
    display: flex;
    color: rgba(10, 13, 6, 0.66);
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    line-height: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.desktop-nav .btn-action:hover {
    outline: 1px solid #0A0D06;
    outline-offset: -1px;
}

.desktop-nav .btn-action:disabled {
    color: rgba(96, 108, 56, 0.33);
    cursor: not-allowed;
}

.desktop-nav .btn-action:disabled:hover {
    outline: none;
}

/* Search Container */
.desktop-nav .search-container {
    align-self: stretch;
    padding: 8px;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    display: inline-flex;
}

.desktop-nav .search-container input {
    width: 179px;
    flex: 1 1 0;
    background: rgba(0, 0, 0, 0.05);
    background-blend-mode: multiply;
    border-radius: 2px;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    display: flex;
    color: rgba(10, 13, 6, 0.66);
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400;
    word-wrap: break-word;
    border: none;
}

.desktop-nav .search-container input::placeholder {
    color: rgba(10, 13, 6, 0.66);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-start;
}

.nav-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.nav-right {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.nav-left span {
    font-weight: normal;
    color: #283618;
    font-size: 0.8rem;
    white-space: nowrap;
}

.search-container input {
    padding: 8px 12px;
    border: 1px solid #e9edc9;
    border-radius: 1px;
    font-size: 12px;
    min-width: 250px;
    background-color: #e9edc9;
}

.search-container input:focus {
    outline: none;
    /* border-color: #283618; */
    box-shadow: 0 0 0 4px rgba(0,123,255,0.1);
}

/* Quick Navigation in Desktop Nav */
.desktop-nav .quick-nav {
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 4;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.desktop-nav .quick-nav .alphabet-title {
    font-size: 16px;
    color: #283618;
    font-weight: 600;
    white-space: nowrap;
}

.desktop-nav .alphabet-links { 
    font-size: 16px;
    display: flex;
    gap: 0;
    flex-wrap: n0wrap;
}

.desktop-nav .alphabet-link {
    padding: 4px 4px;
    background: transparent;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    color: #283618;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.desktop-nav .alphabet-link:hover {
    background: #283618;
    color: #e9edc9;
    border: 1px solid #283618;
}

.desktop-nav .alphabet-separator {
    color: #e9edc9;
    margin: 0 4px;
    font-size: 16px;
}


/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
}

.filters-section {
    background: #ccd5ae;
    border-radius: 4px;
    grid-column: 1;
}

.profiles-section {
    grid-column: 2;
    align-self: start;
}

.filters { 
    background: #ccd5ae; 
    padding: 8px; 
    border-radius: 4px; 
    border: #283618 1px solid;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 4px; 
}

/* Individual Filter Styles */
.filter-item {
    border: 1px solid #ccd5ae;
    background: #ccd5ae;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0px;
}

/* Super Filter Styles */
.super-filters {
    background: #ccd5ae;
    border: 1px solid #283618;
    margin-bottom: 16px;
}

.super-filters .filter-header {
    background: #ccd5ae;
    color: #283618;
    font-weight: 600;
}

.super-filters .filter-header span {
    color: #283618;
}

.super-filters .filter-icon {
    color: #ccd5ae;
    font-weight: bold;
    font-size: 1.2em;
}

.super-filter-content {
    background: white;
}

.super-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px 12px 16px;
    margin-right: 12px;
}

.super-filter-btn {
    background: #283618;
    color: #e9edc9;
    border: 1px solid #283618;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.super-filter-btn:hover {
    background: #ccd5ae;
    border-color: #283618;
    color: #283618;
}

.super-filter-btn:active {
    background: #ccd5ae;
    border-color: #283618;
    color: #283618;
}

.super-filter-btn.active {
    background: #283618;
    color: #e9edc9;
    border-color: #283618;
}

.super-filter-btn.active:hover {
    background: #e9edc9;
    color: #283618;
}

/* Domain group section styling */
.domain-group-section {
    margin-bottom: 16px;
}

.domain-group-header {
    font-size: 12px;
    font-weight: 600;
    color: rgba(40, 54, 24, 0.66);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-left: 4px;
}

/* Clear All button specific styling - only when in standalone container */
.super-filter-buttons[style*="border-top"] .super-filter-btn {
    background: #6c757d;
    border-color: #283618;
}

.super-filter-buttons[style*="border-top"] .super-filter-btn:hover {
    background: #e9edc9;
    border-color: #283618;
    color: #606c38;
}

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

.filter-header {
    background: #ccd5ae;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: #495057;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.filter-header:hover {
    background: #e9edc9;
    color: #606c38;
}

.filter-icon {
    font-size: 16px;
    font-weight: bold;
    color: #6c757d;
    transition: transform 0.2s ease;
}

.filter-content {
    display: none;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.filter-content.active {
    display: block;
    background: #FEFAE0;
}

.filter-content .filter-group {
    margin-bottom: 0;
    padding: 8px;
}

/* Quick Navigation Styles */
.quick-nav {
    background: #ededed;
    padding: 16px;
    border-radius: 4px;
    border-left: 4px solid #31364d;
}

.quick-nav h3 {
    margin: 0 0 16px 0;
    color: #31364d;
    font-size: 12px;
    font-weight: 600;
}


.alphabet-nav {
    margin-top: 15px;
}

.alphabet-title {
    font-size: 12px;
    color: #283618;
    margin-bottom: 8px;
    font-weight: 600;
}

.alphabet-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.alphabet-link {
    display: inline-block;
    padding: 4px 8px;
    background: #5467be;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.alphabet-link:hover {
    background: #ccd5ae;
    transform: translateY(-1px);
    color: #606c38;
}

.alphabet-link.disabled {
    /* background: #ccc; */
    color: #283618;
    cursor: not-allowed;
    opacity: 0.3;
}

.alphabet-link.disabled:hover {
    transform: none;
    background: #ccc;
    color: #283618;
}
.filter-group { 
    margin-bottom: 16px;
    padding: 0;
}
.filter-group label { display: block; font-weight: 600; margin-bottom: 5px; color: #fefae0; }
.filter-group select:not([multiple]), .filter-group input { width: 100%; padding: 8px 0; border: none; border-radius: 4px; font-size: 12px; transition: border-color 0.3s ease; }
.filter-group select[multiple] { 
    height: 120px !important; 
    line-height: 1.2rem !important;
    border: .3px solid #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    background: white !important;
    overflow-y: auto !important;
    width: 99% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
}
.filter-group select:focus, .filter-group input:focus { outline: none; border: none; }
.filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; margin-bottom: 15px; }
.search-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid #283618; }
.profiles-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
    align-items: stretch;
}
@media (max-width: 1200px) { .profiles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .profiles-grid { grid-template-columns: 1fr; } }
.profile-card { 
    background: #FEFAE0; 
    border-radius: 4px; 
    padding: 16px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.13); 
    transition: all 0.3s ease; 
    cursor: pointer; 
    border: 1px solid #E9EDC9;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    position: relative;
}
.profile-card:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #CCD5AE;
}
.profile-card.selected { 
    border: 1px solid #283618; 
    box-shadow: 0 0 0 4px rgba(40, 54, 24, 0.1);
    transform: translateY(-2px);
}
.profile-header { display: flex; justify-content: space-between; align-items: center; }
.profile-name-display { background: #ccd5ae; color: #283618; padding: 4px 8px; border-radius: 4px; font-size: 16px; font-weight: bold; }
.card-header { 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    flex-shrink: 0;
}
.card-name-row { 
    padding-bottom: 4px; 
    border-bottom: 1px solid #283618; 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end; 
    width: 100%; 
}
.card-name { 
    color: #0A0D06; 
    font-size: 20px; 
    font-weight: 700; 
    line-height: 16px; 
    flex: 1; 
}
.card-selected { 
    opacity: 0.6; 
    color: rgba(10, 13, 6, 0.8); 
    font-size: 8px; 
    font-weight: 400; 
    text-transform: uppercase; 
    letter-spacing: 0.3px; 
    line-height: 8px; 
    text-align: right; 
    display: flex; 
    justify-content: center; 
    flex-direction: column; 
    width: 51px; 
    align-self: stretch; 
}
.card-content { 
    padding: 16px; 
    display: flex; 
    flex-direction: column; 
    gap: 16px; 
    width: 100%;
    flex: 1;
    height: 100%;
}
.card-fields { 
    display: flex; 
    flex-direction: column; 
    gap: 16px; 
}
.field-group { 
    display: flex; 
    flex-direction: column; 
    gap: 2px; 
}
.field-label { 
    opacity: 0.6; 
    color: rgba(10, 13, 6, 0.8); 
    font-size: 8px; 
    font-weight: 400; 
    text-transform: uppercase; 
    line-height: 8px; 
    letter-spacing: 0.3px; 
    height: 12px; 
    display: flex; 
    align-items: center; 
}
.field-value { 
    color: #0A0D06; 
    font-size: 16px; 
    font-weight: 400; 
    line-height: 16px; 
}
.profile-traits { 
    /* padding-bottom: 12px;  */
}
.traits-list { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 4px; 
    align-content: flex-start; 
}
.profile-actions { 
    border-radius: 4px; 
    display: flex; 
    justify-content: flex-end; 
    align-items: center; 
    gap: 0; 
    width: 100%; 
    background: #FEFAE0;
    margin-top: auto;
}
.btn { 
    padding: 8px; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    font-size: 12px; 
    font-weight: 500; 
    line-height: 16px; 
    text-decoration: none; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 2px; 
    transition: all 0.2s ease; 
    opacity: 0.8; 
    color: #0A0D06; 
    background: transparent;
}
.btn:hover { 
    outline: 1px solid #0A0D06; 
    outline-offset: -1px; 
}
.traits-section { margin-bottom: 16px; }
.traits-label { color: #4A5565; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.trait-tag { 
    background: #606C38; 
    color: #CCD5AE; 
    padding: 8px; 
    border-radius: 4px; 
    font-size: 10px; 
    font-weight: 500; 
    line-height: 16px; 
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
}
.trait-tag:hover { 
    filter: brightness(0.8);
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.clickable-badge {
    position: relative;
}
.trait-tag.active { 
    filter: brightness(0.7);
}

.clickable-badge.active {
    filter: brightness(0.7) !important;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(40, 54, 24, 0.3);
}

/* BEHAVIORAL HUMANISM CATEGORIES - Blues/Teals */
.trait-tag.cat-bias-awareness { background: #5B8C8E; color: #FFF; }
.trait-tag.cat-growth-motivation { background: #6C9C9E; color: #000; }
.trait-tag.cat-cognitive-humanism { background: #3A6C6E; color: #FFF; }
.trait-tag.cat-humanistic-cognition { background: #2A5C5E; color: #FFF; }
.trait-tag.cat-human-needs-hierarchy { background: #1A4C4E; color: #FFF; }
.trait-tag.cat-self-actualization { background: #0A3C3E; color: #FFF; }
.trait-tag.cat-behavioral-growth { background: #4A7C7E; color: #FFF; }

/* TIER 1 CATEGORIES - Purples/Violets */
.trait-tag.cat-technology-relationship { background: #7B68A0; color: #FFF; }
.trait-tag.cat-crisis-response { background: #8B78B0; color: #FFF; }
.trait-tag.cat-influence-style { background: #9B88C0; color: #000; }

/* TIER 2 CATEGORIES - Warm Oranges */
.trait-tag.cat-resource-relationship { background: #C17A4F; color: #FFF; }
.trait-tag.cat-time-orientation { background: #D18A5F; color: #000; }
.trait-tag.cat-collaboration-enhancement { background: #E19A6F; color: #000; }

/* TRADITIONAL CATEGORIES - Greens */
.trait-tag.cat-communication-style { background: #606C38; color: #CCD5AE; }
.trait-tag.cat-behavioral-patterns { background: #708C48; color: #FFF; }
.trait-tag.cat-psychological-profile { background: #506C28; color: #FFF; }
.trait-tag.cat-decision-making { background: #607C38; color: #CCD5AE; }
.trait-tag.cat-learning { background: #709C48; color: #000; }
.trait-tag.cat-values { background: #507C28; color: #FFF; }
.trait-tag.cat-domain-expertise { background: #608C38; color: #CCD5AE; }
.trait-tag.cat-collaboration { background: #70AC48; color: #000; }
.trait-tag.cat-temporal-context { background: #508C28; color: #FFF; }
.trait-tag.cat-cultural-context { background: #60AC38; color: #000; }
.btn-details {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    line-height: 16px;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    transition: all 0.2s ease;
    opacity: 0.8;
    color: #0A0D06;
    background: rgb(0, 0, 0, 0.1);
}

.btn-details:hover {
    outline: 1px solid #0A0D06;
    outline-offset: -1px;
}

/* Expanded Profile Header Styles */
.expanded-profile-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.expanded-profile-metadata {
    display: flex;
    gap: 24px;
}

.expanded-metadata-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.expanded-metadata-label {
    font-size: 10px;
    color: rgba(10, 13, 6, 0.66);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.expanded-metadata-value {
    font-size: 14px;
    color: #283618;
    font-weight: 400;
}

.expanded-profile-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.expanded-format-toggles {
    display: flex;
    align-items: center;
    gap: 17px;
}

.expanded-format-option {
    display: flex;
    align-items: center;
    gap: 2px;
}

.expanded-radio-button {
    width: 14px;
    height: 14px;
    position: relative;
}

.expanded-radio-outer {
    width: 14px;
    height: 14px;
    position: absolute;
    background: #FEFAE0;
    border-radius: 9999px;
    border: 1px solid rgba(96, 108, 56, 0.66);
}

.expanded-radio-button.checked .expanded-radio-outer {
    border: 1px solid #606C38;
}

.expanded-radio-inner {
    width: 6px;
    height: 6px;
    position: absolute;
    left: 4px;
    top: 4px;
    background: #606C38;
    border-radius: 9999px;
}

.expanded-format-option label {
    opacity: 0.66;
    color: #0A0D06;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    line-height: 24px;
    letter-spacing: 0.30px;
    cursor: pointer;
}
.no-results { text-align: center; padding: 40px; color: #283618; font-size: 1.2rem; }
.loading { text-align: center; padding: 40px; color: #283618; font-size: 1.2rem; }
.stats { background: white; padding: 15px; border-radius: 4px; margin-bottom: 20px; text-align: center; font-weight: 600; }
.comparison-panel { position: fixed; bottom: 0; left: 0; right: 0; background: white; border-top: 2px solid #283618; padding: 15px; transform: translateY(100%); transition: transform 0.3s ease; z-index: 1000; max-height: 300px; overflow-y: auto; }
.comparison-panel.show { transform: translateY(0); }
.comparison-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.comparison-header h3 { margin: 0; color: #283618; }
.comparison-header div { display: flex; gap: 10px; align-items: center; }
.comparison-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 8px; }
.comparison-profile { background: #f8f9fa; padding: 10px; border-radius: 4px; border-left: 3px solid #283618; }
/* Mobile hamburger menu */
.mobile-menu-toggle {
    display: none;
    background: #3f4e91;
    color: #283618;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 15px;
}

.mobile-menu-toggle:hover {
    background: #ccd5ae;
    color: #606c38;
}

/* Mobile filter header */
.mobile-filter-header {
    display: none;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    align-items: center;
    justify-content: space-between;
}

.mobile-filter-header .mobile-menu-toggle {
    margin-bottom: 0;
}

.mobile-filter-header .view-toggle {
    margin: 0;
    
}

/* View toggle button styling to match filters button */
.view-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
}

/* Desktop navigation styling */
.desktop-nav {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    background: #ccd5ae;
    border-radius: 4px;
    border: 1px solid #283618;
}


.view-toggle button {
    background: #ccd5ae;
    color: #283618;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.view-toggle button:hover {
    background: #ccd5ae;
    color: #606c38;
}

.view-toggle button.active {
    background: #e9edc9;
    font-weight: bold;
}

/* Single toggle button styling */
.view-toggle-single {
    background: #ccd5ae;
    border: 1px solid #ccd5ae;
    color: #283618;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    margin-bottom: 20px;
}

.view-toggle-single:hover {
    background: #ccd5ae;
    border: 1px solid #283618;
}

.view-toggle-single.grid-view {
    background: #ccd5ae;
    border: 1px solid #283618;
}

.view-toggle-single.list-view:hover, .view-toggle-single.grid-view:hover{
    border: 1px solid #283618;
}

/* Desktop navigation bar */
.desktop-nav {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    background: #ccd5ae;
    border-radius: 4px;
    padding: 16px;
}

.desktop-nav .view-toggle-single {
    margin-bottom: 0;
}

/* Uniform Button Styling */
.nav-left .btn,
.nav-left .view-toggle-single {
    padding: 4px 8px;
    font-size: 16px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
    /* border: 1px solid #283618; */
    background: #ccd5ae;
    color: #495057;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid #ccd5ae;
}

.nav-left .btn:hover,
.nav-left .view-toggle-single:hover {
    background: #ccd5ae;
    border-color: #283618 1px solid;
}

.nav-left .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-left .btn.btn-secondary {
    color: #283618;
    /* border-color: #283618; */
}

.nav-left .btn.btn-secondary:hover {
    color: #283618;
    border-color: #283618;
}

.nav-left .btn.btn-outline {
    color: #283618;
}

.nav-left .btn.btn-outline:hover {
    color: #283618;
    border-color: #283618;
}

@media (max-width: 768px) { 
    .container { 
        padding: 10px; 
        gap: 15px;
    } 
    
    .header h1 { font-size: 1.8rem; } 
    
    .desktop-nav {
        display: none; /* Hide desktop nav on mobile */
    }
    
    .main-content {
        grid-template-columns: 1fr; /* Stack sidebar and main content on mobile */
        gap: 15px;
    }
    
    .filter-row { grid-template-columns: 1fr; } 
    .profiles-grid { grid-template-columns: 1fr; } 
    .filters { padding: 16px; }
    .profile-card { 
        padding: 16px; 
        touch-action: manipulation; /* Improves touch responsiveness */
        transition: transform 0.1s ease;
    }
    /* .profile-card:active {
        transform: scale(0.98);
    } */
    .btn { padding: 8px 16px; font-size: 16px; }
    
    /* Mobile hamburger menu */
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-filter-header {
        display: flex;
        gap: 15px;
    }
    
    .mobile-search {
        flex: 1;
    }
    
    .mobile-search input {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Enhanced list view for mobile */
    .profiles-list {
        padding: 15px;
    }
    
    .list-item {
        padding: 15px;
        margin-bottom: 15px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        border: 1px solid #e9ecef;
        touch-action: manipulation;
    }
    
    .list-item:active {
        transform: scale(0.98);
    }
    
    .list-item-header {
        margin-bottom: 10px;
    }
    
    .list-item-name {
        font-size: 1.2rem;
        margin-bottom: 5px;
        color: #283618;
    }
    
    .list-item-meta {
        display: flex;
        flex-direction: column;
        gap: 4px;
        font-size: 0.9rem;
        color: #666;
    }
    
    .list-item-traits {
        margin-bottom: 10px;
    }
    
    .trait-tag {
        display: inline-block;
        background: #e8f5e8;
        color: #2e7d32;
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 0.8rem;
        margin: 2px;
    }
    
    .list-item-description {
        font-size: 0.9rem;
        color: #666;
        line-height: 1.4;
        margin-bottom: 15px;
    }
    
    .list-item-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .list-item-actions button {
        flex: 1;
        min-width: 80px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .filters {
        display: none; /* Hidden by default on mobile */
    }
    
    .filters.show {
        display: block; /* Show when toggled */
    }

    /* Hide desktop nav on mobile */
    .desktop-nav {
        display: none;
    }
}
.profiles-list .profile-card { display: flex; align-items: center; margin-bottom: 10px; }
.profiles-list .profile-card .profile-name { flex-grow: 1; }

/* Expanded profile view */
.expanded-profile {
    background: #ccd5ae;
    border-radius: 0;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    width: 100vw;
    height: 100vh;
}

body.modal-open {
    overflow: hidden;
}

.expanded-profile.show {
    display: block;
}

/* Ensure colophon modal header uses same layout as other modals */
#colophon-modal .expanded-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Center the colophon card */
#colophon-modal .expanded-profile-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px;
}

#colophon-modal .expanded-category-card {
    width: 66.666%;
    max-width: 900px;
    margin: 0 auto;
}

.main-content {
    position: relative;
}

.expanded-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #283618;
}

.expanded-profile-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.expanded-profile-actions .close-expanded {
    margin-left: 15px;
}

.expanded-profile-title {
    font-size: 2rem;
    font-weight: 600;
    color: #283618;
}

.expanded-profile-subtitle {
    font-size: 12px;
    color: #283618;
    margin-top: 4px;
}

.close-expanded {
    background: transparent;
    border: none;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #283618;
    transition: all 0.2s ease;
}

.close-expanded:hover {
    outline: 1px solid #0A0D06;
    outline-offset: -1px;
    color: #0A0D06;
}

.expanded-profile-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding: 20px;
}

.expanded-section {
    margin-bottom: 24px;
}

.expanded-section h3 {
    color: #283618;
    margin-bottom: 10px;
    font-size: 1.5rem;
    font-weight: 600;
}

.expanded-trait-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.expanded-trait {
    background: #606c38;
    color: #ccd5ae;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.expanded-text {        
    color: #283618;
    line-height: 1.3;
    font-size: 16px;
}

/* Mobile responsive for expanded view */
@media (max-width: 768px) {
    .expanded-profile {
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .expanded-profile-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .expanded-profile-content {
        grid-template-columns: 1fr;
    }
}

/* Category card styles - wireframe layout with home page card styling */
.expanded-category-card {
    background: #FEFAE0;
    border-radius: 4px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.13);
    /* border: 1px solid #E9EDC9; */
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    position: relative;
}

.expanded-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #CCD5AE;
}

/* Category title - larger, bold, black, with rule line underneath */
.expanded-category-header {
    font-size: 24px;
    font-weight: bold;
    color: #283618;
    margin-bottom: 12px;
    border-bottom: 2px solid #283618;
    padding-bottom: 8px;
}

/* Section titles - uppercase, smaller, left-aligned */
.expanded-section-title {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 8px;
    padding-bottom: 6px;
    color: #283618;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #ddd;
}

.expanded-section-title:first-child {
    margin-top: 8px;
}


/* Trait chips - light gray background, black text, left-aligned */
.expanded-trait-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.expanded-trait {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ccd5ae;
    color: #283618;
    border: 1px solid #ccd5ae;
}

.expanded-trait:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    background: #b7c48e;
}

.expanded-trait.clickable-badge.active {
    border: 1px solid #283618;
    box-shadow: 0 0 0 4px rgba(40, 54, 24, 0.1);
}
