/* The SAFE Standard for Femtech CSS */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --color-excellent: #10b981;
    --color-good: #f59e0b;
    --color-poor: #ef4444;
    --color-accuracy: #2563eb;    /* Dark blue - Accuracy dimension */
    --color-primary: #A78BFA;    /* Purple - matches website */
    --color-secondary: #6EE7B7;   /* Teal - matches website */
    --color-accent: #FB7185;      /* Coral - matches website */
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-bg: #ffffff;
    --color-bg-alt: #f9fafb;
    --color-bg-gradient: linear-gradient(to br, #faf5ff, #f0fdfa);
    --color-border: #e5e7eb;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--color-text);
    line-height: 1.6;
    background: #f9fafb;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    text-decoration: none;
    color: var(--color-text);
}

.nav-brand h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.03em;
    background: linear-gradient(135deg, #7c3aed, #4f9d8e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-brand .tagline {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-menu a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    font-size: 1.05rem;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: var(--color-primary);
}

.nav-menu a.nav-logout {
    color: #ef4444;
}

.nav-menu a.nav-logout:hover {
    color: #dc2626;
}

/* Public Navigation (matches maetri.org) */
.public-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.public-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5.5rem;
}

@media (min-width: 768px) {
    .public-nav-inner { height: 7rem; }
}

.public-nav-brand {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.public-nav-logo {
    height: 5rem;
    width: auto;
}

@media (min-width: 768px) {
    .public-nav-logo { height: 6.5rem; }
}

.pub-nav-dropdown-right {
    left: auto;
    right: 0;
}

.public-nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .public-nav-links { display: flex; }
}

.public-nav-link {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    font-family: inherit;
}

.public-nav-link:hover {
    color: #111827;
}

.public-nav-chevron {
    transition: transform 0.2s;
}

.public-nav-dropdown {
    position: relative;
}

.public-nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    width: 14rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 0.5rem 0;
    z-index: 50;
}

.public-nav-dropdown-item {
    display: block;
    padding: 0.625rem 1rem;
    text-decoration: none;
    color: #374151;
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
}

.public-nav-dropdown-item:hover {
    background: #faf5ff;
    color: #7c3aed;
}

.public-nav-dropdown-item strong {
    display: block;
    font-weight: 600;
}

.public-nav-dropdown-item span {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.125rem;
}

.public-nav-hamburger {
    display: block;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #374151;
}

@media (min-width: 768px) {
    .public-nav-hamburger { display: none; }
}

.public-nav-mobile {
    display: none;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid #f3f4f6;
}

.public-nav-mobile-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 0;
}

.public-nav-mobile-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: background 0.15s;
}

.public-nav-mobile-link:hover {
    background: #faf5ff;
}

.public-nav-mobile-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 0.5rem 0;
}

/* Product Directory Search Bar */
.directory-search-bar {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 9999px;
    padding: 0.375rem 0.375rem 0.375rem 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    max-width: 44rem;
    margin: 0 auto;
}

.directory-search-bar:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}

.directory-search-bar .search-icon {
    color: #9ca3af;
    flex-shrink: 0;
}

.directory-search-bar input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.75rem;
    font-size: 1rem;
    color: #1f2937;
    background: transparent;
    min-width: 0;
    font-family: inherit;
}

.directory-search-bar input::placeholder {
    color: #c4b5fd;
}

.directory-search-bar button {
    flex-shrink: 0;
    background: #7c3aed;
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.directory-search-bar button:hover {
    background: #6d28d9;
}

/* Product Directory Filters */
.directory-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.25rem;
}

.directory-filters select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #374151;
    background: white;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: border-color 0.2s;
}

.directory-filters select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.directory-filters .filter-clear {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #6b7280;
    background: white;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
}

.directory-filters .filter-clear:hover {
    border-color: #d1d5db;
    color: #374151;
}

/* Redesigned Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.product-card {
    position: relative;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
    border-color: var(--color-primary);
}

.product-card-top {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.product-card-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f3f4f6;
    background: white;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.product-card-logo-placeholder {
    font-size: 1.25rem;
    font-weight: 800;
    color: #7c3aed;
    background: #faf5ff;
}

.product-card-info {
    flex: 1;
    min-width: 0;
}

.product-card-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.125rem;
    line-height: 1.3;
}

.product-card-company {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0;
}

.product-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.product-card-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.1875rem 0.5rem;
    border-radius: 9999px;
    background: #f3f4f6;
    color: #6b7280;
}

.product-card-tag.tag-type {
    background: #ede9fe;
    color: #7c3aed;
}

.product-card-tag.tag-medical {
    background: #dbeafe;
    color: #2563eb;
}

.product-card-tag.tag-wellness {
    background: #d1fae5;
    color: #059669;
}

/* Score Circle (card) */
.product-card-score {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #fafafa;
    border-radius: 0.75rem;
}

.score-circle-sm {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 4px solid;
    background: white;
    flex-shrink: 0;
}

.score-circle-sm.score-excellent {
    border-color: var(--color-excellent);
    color: var(--color-excellent);
}

.score-circle-sm.score-good {
    border-color: var(--color-good);
    color: var(--color-good);
}

.score-circle-sm.score-poor {
    border-color: var(--color-poor);
    color: var(--color-poor);
}

.score-circle-sm .sc-num {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
}

.score-circle-sm .sc-max {
    font-size: 0.5rem;
    font-weight: 600;
    opacity: 0.7;
}

/* Dimension Bars (card) */
.dim-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

/* Compact SAFE score pills — mobile only */
.dim-compact {
    display: none;
    flex-wrap: wrap;
    gap: 0.375rem;
    justify-content: center;
    margin-top: 0.25rem;
}
.dim-compact-item {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    letter-spacing: 0.02em;
    min-width: 2.5rem;
    text-align: center;
}
.dim-compact-s { background: #ede9fe; color: #7c3aed; }
.dim-compact-a { background: #ccfbf1; color: #0d9488; }
.dim-compact-f { background: #fce7f3; color: #be185d; }
.dim-compact-e { background: #ffedd5; color: #c2410c; }

.dim-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dim-bar-label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #6b7280;
    width: 4.25rem;
    flex-shrink: 0;
}

.dim-bar-track {
    flex: 1;
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
}

.dim-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.dim-bar-fill.fill-s { background: #7c3aed; }
.dim-bar-fill.fill-a { background: var(--color-accuracy); }
.dim-bar-fill.fill-f { background: #ec4899; }
.dim-bar-fill.fill-e { background: #22c55e; }

.dim-bar-val {
    font-size: 0.75rem;
    font-weight: 700;
    color: #374151;
    width: 2rem;
    text-align: right;
}

/* Card CTA */
.product-card-cta {
    display: block;
    margin-top: auto;
    padding-top: 1rem;
    text-align: center;
}

.product-card-cta a {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 2px solid #7c3aed;
    border-radius: 9999px;
    color: #7c3aed;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s;
    /* Stretched link — makes entire card clickable */
    position: static;
}
.product-card-cta a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.product-card-cta a:hover {
    background: #7c3aed;
    color: white;
}

.product-card-unscored {
    text-align: center;
    padding: 1.5rem 0 0.5rem;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Coming Soon ribbon on product cards */
.coming-soon-ribbon {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    box-shadow: 0 1px 4px rgba(217, 119, 6, 0.3);
    z-index: 1;
}

/* Coming Soon notice on scorecard page */
.card-coming-soon-notice {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0.75rem 1.25rem;
    padding: 0.625rem 0.875rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    color: #92400e;
    font-weight: 500;
}

/* Company group header */
.company-group-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0 0.25rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.25rem;
}
.company-group-name {
    font-weight: 700;
    font-size: 1rem;
    color: #374151;
}
.company-group-count {
    font-size: 0.8125rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Results count */
.directory-results {
    text-align: center;
    font-size: 0.875rem;
    color: #9ca3af;
    margin-top: 1rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(to bottom right, #faf5ff, #f0fdfa, #fff1f2);
    color: var(--color-text);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.hero .lead {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 9999px;  /* Fully rounded like website */
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 20px 25px -5px rgba(167, 139, 250, 0.3);
    transform: translateY(-2px) scale(1.05);
}

.btn-coming-soon {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.btn-coming-soon:hover {
    background: #fde68a;
}

.btn-secondary {
    background: white;
    color: #1f2937;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-primary);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

.btn-success {
    background: var(--color-excellent);
    color: white;
    border: none;
}

.btn-success:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-action {
    background: white;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}

.btn-action:hover {
    background: var(--color-primary);
    color: white;
}

.action-select {
    padding: 0.4rem 0.6rem;
    border: 1.5px solid var(--color-primary);
    border-radius: 9999px;
    background: white;
    color: var(--color-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A78BFA' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    padding-right: 1.5rem;
}

.action-select:hover {
    background-color: #faf5ff;
    border-color: #8b5cf6;
}

.action-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.3);
}

/* Sections */
section {
    margin: var(--spacing-xl) 0;
}

h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}

.lead {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

/* Dimensions Grid */
.dimensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.dimension-card {
    background: var(--color-bg-alt);
    padding: var(--spacing-lg);
    border-radius: 0.75rem;
    text-align: center;
}

.dimension-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin: 0 auto var(--spacing-sm);
}

.dimension-icon.security { background: #3b82f6; }
.dimension-icon.accuracy { background: var(--color-accuracy); }
.dimension-icon.foundation { background: var(--color-primary); }
.dimension-icon.equity { background: var(--color-secondary); }

.dimension-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

/* Product Cards */
/* (duplicate .products-grid and .product-card removed — see earlier definitions) */

.product-header h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.product-header .company {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-sm);
}

.product-logo-small {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    border: 1px solid var(--color-border);
    background: white;
}

.product-logo-small img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

/* Score Badges - Yuka Style Circular Badges */
.score-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-sm);
    border-radius: 0.5rem;
    margin: var(--spacing-sm) 0;
}

.score-badge.score-excellent {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-excellent);
}

.score-badge.score-good {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-good);
}

.score-badge.score-poor {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-poor);
}

/* Circular Badge - Yuka Style */
.score-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 8px solid;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.score-circle.score-excellent {
    border-color: var(--color-excellent);
    color: var(--color-excellent);
}

.score-circle.score-good {
    border-color: var(--color-good);
    color: var(--color-good);
}

.score-circle.score-poor {
    border-color: var(--color-poor);
    color: var(--color-poor);
}

.score-circle .score-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.score-circle .score-max {
    font-size: 1.25rem;
    opacity: 0.7;
    font-weight: 600;
}

.score-circle .score-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

.score-badge-large {
    padding: var(--spacing-lg);
}

.score-number {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
}

.score-badge-large .score-number {
    font-size: 3.5rem;
}

.score-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.score-max {
    font-size: 1.5rem;
    opacity: 0.7;
}

/* Dimension Scores Mini */
.dimension-scores {
    display: flex;
    gap: var(--spacing-sm);
    margin: var(--spacing-sm) 0;
}

.dimension-mini {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    background: var(--color-bg-alt);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dimension-mini .label {
    font-weight: 600;
    color: var(--color-text-light);
    font-size: 0.75rem;
}

.dimension-mini .value {
    font-weight: 700;
    color: var(--color-text);
    font-size: 1rem;
}

/* Product Detail */
.product-header-full {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.product-title-section {
    display: flex;
    align-items: start;
    gap: var(--spacing-md);
}

.product-logo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.product-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.company-name {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin: 0.5rem 0;
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-bg-alt);
    border-radius: 1rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Dimension Dots - Compact score indicators */
.dimension-dots {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.dimension-dot-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-strong {
    background: var(--color-excellent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.dot-mixed {
    background: var(--color-good);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.dot-high-concern {
    background: var(--color-poor);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.dot-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    min-width: 80px;
}

.dot-score {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 500;
}

.score-interpretation {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md);
    border-radius: 0.5rem;
}

.interpretation.excellent {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--color-excellent);
}

.interpretation.good {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--color-good);
}

.interpretation.poor {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--color-poor);
}

/* Dimension Detail Cards - Flo Health Style */
.dimensions-detail {
    margin-top: var(--spacing-xl);
}

.dimension-detail-card {
    background: white;
    border-radius: 1.25rem;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dimension-detail-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Gradient backgrounds for each dimension */
.dimension-detail-card.security {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.08) 0%, rgba(167, 139, 250, 0.02) 100%);
}

.dimension-detail-card.accuracy {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06) 0%, rgba(37, 99, 235, 0.02) 100%);
}

.dimension-detail-card.foundation {
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.08) 0%, rgba(251, 113, 133, 0.02) 100%);
}

.dimension-detail-card.equity {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.02) 100%);
}

.dimension-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    gap: var(--spacing-md);
}

.dimension-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-text);
}

.dimension-desc {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin: 0.25rem 0 0 0;
}

/* Progress bar style score */
.dimension-score-container {
    text-align: right;
}

.dimension-score-number {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.dimension-score-number.score-strong {
    color: var(--color-excellent);
}

.dimension-score-number.score-mixed {
    color: var(--color-good);
}

.dimension-score-number.score-high-concern {
    color: var(--color-poor);
}

.dimension-progress-bar {
    width: 150px;
    height: 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 9999px;
    overflow: hidden;
    margin-left: auto;
}

.dimension-progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease;
}

.dimension-progress-fill.score-strong {
    background: linear-gradient(90deg, var(--color-excellent), #10b981);
}

.dimension-progress-fill.score-mixed {
    background: linear-gradient(90deg, var(--color-good), #f59e0b);
}

.dimension-progress-fill.score-high-concern {
    background: linear-gradient(90deg, var(--color-poor), #ef4444);
}

.dimension-summary {
    margin: var(--spacing-md) 0;
    color: var(--color-text);
    line-height: 1.6;
}

.dimension-section {
    margin: var(--spacing-md) 0;
}

.dimension-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Color-coded dots for strengths and concerns */
.strengths-list, .concerns-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.strengths-list li, .concerns-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.strengths-list li::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-excellent);
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.concerns-list li::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-poor);
    margin-top: 0.5rem;
    flex-shrink: 0;
}

/* CTA Button */
.product-cta {
    margin: var(--spacing-xl) 0;
    text-align: center;
}

.btn-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #FB7185, #F97316);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(251, 113, 133, 0.4);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 113, 133, 0.5);
}

/* How Calculated Section */
.how-calculated {
    background: rgba(167, 139, 250, 0.05);
    border-radius: 1rem;
    padding: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.how-calculated h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}

.how-calculated p {
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

.how-calculated ul {
    margin: var(--spacing-sm) 0;
    padding-left: 1.5rem;
}

.how-calculated li {
    line-height: 1.7;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.evaluation-date {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--color-text-light);
}

/* ==========================================
   Trading Card Scorecard
   ========================================== */

.card-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
}

/* Card Frame — the collectible border */
.card-frame {
    position: relative;
    border-radius: 1.25rem;
    padding: 4px;
    background-size: 300% 300%;
}

/* Rarity: Excellent — subtle gold, slow shimmer */
.card-rarity-excellent {
    background: linear-gradient(145deg, #fde68a, #fbbf24, #fef3c7, #fbbf24);
    background-size: 300% 300%;
    animation: cardShimmer 12s ease infinite;
    box-shadow:
        0 6px 24px rgba(245, 158, 11, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Rarity: Good — subtle silver/purple, slow */
.card-rarity-good {
    background: linear-gradient(145deg, #e5e7eb, #ede9fe, #e5e7eb, #ddd6fe);
    background-size: 300% 300%;
    animation: cardShimmer 16s ease infinite;
    box-shadow:
        0 6px 24px rgba(167, 139, 250, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Rarity: Poor — muted, very slow */
.card-rarity-poor {
    background: linear-gradient(145deg, #e5e7eb, #f3f4f6, #e5e7eb);
    background-size: 300% 300%;
    animation: cardShimmer 20s ease infinite;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Rarity: Not scored */
.card-rarity-none {
    background: linear-gradient(145deg, #e5e7eb, #f3f4f6, #e5e7eb);
    background-size: 300% 300%;
    animation: cardShimmer 24s ease infinite;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.04);
}

@keyframes cardShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Thin colored stripe below hero */
.card-hero-stripe {
    height: 4px;
    width: 100%;
}
.card-stripe-excellent { background: linear-gradient(90deg, #10b981, #6ee7b7); }
.card-stripe-good { background: linear-gradient(90deg, #f59e0b, #fde68a); }
.card-stripe-poor { background: linear-gradient(90deg, #ef4444, #fca5a5); }
.card-stripe-high_concern { background: linear-gradient(90deg, #ef4444, #fca5a5); }

.card-inner {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
}

/* Hero Section — compact colored header */
.card-hero {
    position: relative;
    padding: 1.25rem 1rem 1rem;
    overflow: hidden;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
}

/* Score section */
.card-score-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.125rem 1rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    background: white;
    text-align: center;
}
.card-score-num {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
}
.card-score-denom {
    font-size: 1rem;
    font-weight: 500;
    color: #9ca3af;
    margin-left: 0.1rem;
}
.card-score-band-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.2rem;
}

.card-hero-neutral,
.card-hero-none {
    background: linear-gradient(135deg, #ede9fe 0%, #c4b5fd 35%, #bae6fd 70%, #d1fae5 100%);
}

.card-hero-excellent {
    background: linear-gradient(135deg, #ecfdf5 0%, #6ee7b7 45%, #34d399 100%);
}

.card-hero-good {
    background: linear-gradient(135deg, #fffbeb 0%, #fde68a 45%, #f59e0b 100%);
}

.card-hero-poor,
.card-hero-high_concern {
    background: linear-gradient(135deg, #fff1f2 0%, #fecdd3 45%, #f87171 100%);
}

.card-hero-info-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
    position: relative;
    z-index: 1;
}

/* Holographic shine overlay — follows mouse in JS, falls back to animation */
.card-hero-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.25) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.card-frame:hover .card-hero-shine {
    opacity: 1;
}

/* Product logo in header */
.card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    flex-shrink: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
}

.card-avatar img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.card-avatar-placeholder {
    background: white;
}

.card-avatar-placeholder span {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-primary);
}

.card-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    margin: 0;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.card-team {
    font-size: 0.75rem;
    color: rgba(31, 41, 55, 0.6);
    margin: 0.15rem 0 0;
    font-weight: 500;
    position: relative;
    z-index: 1;
}
.card-brief-desc {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0.4rem 0 0;
    line-height: 1.45;
    position: relative;
    z-index: 1;
}

.card-class-badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.2rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.7);
    color: var(--color-text);
    backdrop-filter: blur(4px);
    position: relative;
    z-index: 1;
}

/* Score gauge in hero */
.card-hero-gauge-link {
    text-decoration: none;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}


/* Score Banner */
.card-score-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1.125rem 1rem;
    border-bottom: none;
}

.card-score-banner-excellent { background: rgba(16, 185, 129, 0.07); }
.card-score-banner-good { background: rgba(245, 158, 11, 0.07); }
.card-score-banner-poor { background: rgba(239, 68, 68, 0.07); }

.card-big-score {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.01em;
}

.card-score-of {
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 1;
}

.card-rating-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 0.1rem;
}

.card-score-interpretation {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.375rem;
    font-style: italic;
    line-height: 1.4;
}

.card-score-color-excellent { color: var(--color-excellent); }
.card-score-color-good { color: var(--color-good); }
.card-score-color-poor { color: var(--color-poor); }
.card-score-color-none { color: #9ca3af; }

/* Score Updated Banner */
.score-update-banner {
    margin: 0 1rem 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1.5px solid #fbbf24;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.15);
}
.score-update-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
    color: #92400e;
}
.score-update-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #92400e;
}
.score-update-date {
    font-size: 0.6875rem;
    color: #b45309;
    margin-left: auto;
}
.score-update-body {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.score-update-change {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.score-update-old {
    font-size: 1.125rem;
    font-weight: 700;
    color: #9ca3af;
    text-decoration: line-through;
}
.score-update-new {
    font-size: 1.125rem;
    font-weight: 800;
    color: #1f2937;
}
.score-update-delta, .score-history-delta {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 9999px;
}
.delta-up {
    color: #065f46;
    background: #d1fae5;
}
.delta-down {
    color: #991b1b;
    background: #fee2e2;
}
.score-update-reason {
    font-size: 0.8125rem;
    color: #78350f;
    line-height: 1.4;
    margin: 0;
    font-style: italic;
}

/* Score History Section */
.score-history {
    max-width: 420px;
    margin: 1.5rem auto 0;
    padding: 0 1rem;
}
.score-history-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 1rem;
}
.score-history-timeline {
    position: relative;
    padding-left: 1.25rem;
}
.score-history-timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #e5e7eb;
}
.score-history-entry {
    position: relative;
    padding-bottom: 1rem;
}
.score-history-entry:last-child {
    padding-bottom: 0;
}
.score-history-dot {
    position: absolute;
    left: -1.25rem;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d5db;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #e5e7eb;
}
.entry-current .score-history-dot {
    background: #7c3aed;
    box-shadow: 0 0 0 2px #c4b5fd;
}
.score-history-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.score-history-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.score-history-score {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1f2937;
}
.score-history-band {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1px 6px;
    border-radius: 9999px;
}
.score-history-excellent { color: #065f46; background: #d1fae5; }
.score-history-good { color: #92400e; background: #fef3c7; }
.score-history-poor { color: #991b1b; background: #fee2e2; }
.score-history-date {
    font-size: 0.6875rem;
    color: #9ca3af;
    margin-left: auto;
}
.score-history-current-tag {
    font-size: 0.5625rem;
    font-weight: 700;
    color: #7c3aed;
    background: #ede9fe;
    padding: 1px 6px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.score-history-reason {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
}

/* "Updated" tag on directory cards */
.product-card-updated-tag {
    display: inline-block;
    font-size: 0.5625rem;
    font-weight: 700;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fde68a;
    padding: 0px 5px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
    margin-left: 0.25rem;
}

/* Stats Section */
/* Card summary section */
.card-summary {
    border-bottom: 1px solid #eeeeee;
}

.card-summary-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: color 0.15s;
}

.card-summary-header:hover {
    color: #7c3aed;
}

.card-summary-header::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 12px;
    background: linear-gradient(to bottom, #a78bfa, #6ee7b7);
    border-radius: 2px;
    flex-shrink: 0;
}

.card-summary-chevron {
    margin-left: auto;
    color: #d1d5db;
    flex-shrink: 0;
    transition: transform 0.25s ease, color 0.15s;
}

.card-summary-open .card-summary-chevron {
    transform: rotate(180deg);
    color: #7c3aed;
}

.card-summary-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.card-summary-body .card-summary-text,
.card-summary-body .card-company-products {
    padding: 0 1rem 0.75rem;
    margin: 0;
}

.card-summary-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-text);
}

.card-inline-link {
    color: #7c3aed;
    text-decoration: underline;
    overflow-wrap: break-word;
}
.card-inline-link:hover {
    color: #5b21b6;
}

.card-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}

.card-summary-tag {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.1rem 0.375rem;
    border-radius: 1rem;
    background: #f3f4f6;
    color: #374151;
}

.card-tag-more {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.1rem 0.375rem;
    border-radius: 1rem;
    background: #e5e7eb;
    color: var(--color-primary);
    border: none;
    cursor: pointer;
    font-family: inherit;
    line-height: inherit;
}

.card-tag-more:hover { background: #d1d5db; }

.card-summary-tag-medical {
    background: #eff6ff;
    color: #1d4ed8;
}

.card-summary-tag-wellness {
    background: #f0fdf4;
    color: #15803d;
}

/* Media / In the News section */
.card-media-section {
    margin: 1rem 1.25rem 0.5rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}
.card-media-heading {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.5rem;
}
.card-media-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.card-media-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.card-media-item:hover {
    border-color: #a78bfa;
    box-shadow: 0 1px 4px rgba(124, 58, 237, 0.08);
}
.card-media-title {
    flex: 1;
    font-size: 0.8125rem;
    color: #374151;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card-media-item svg {
    flex-shrink: 0;
    color: #9ca3af;
}

.card-summary-disclaimer {
    font-size: 0.6875rem;
    font-style: italic;
    color: #9ca3af;
    line-height: 1.5;
    text-align: left;
    margin: 1rem 1.25rem 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

/* Card Tabs */
.card-tabs {
    display: flex;
    gap: 0;
    padding: 0 1rem;
    border-bottom: 3px solid #f3f4f6;
    background: #fafafa;
}

.card-tab {
    padding: 0.875rem 1.125rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1f2937;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: color 0.2s, border-color 0.2s;
}

.card-tab:hover {
    color: #000;
}

.card-tab.active {
    color: #000;
    border-bottom-color: var(--color-primary);
    background: white;
}

.card-tab-panel {
    display: none;
}

.card-tab-panel.active {
    display: block;
}

/* Score Summary block at top of Scorecard tab */
.card-score-summary-block {
    padding: 0.875rem 1.25rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    background: #fafafa;
}

.card-score-summary-text {
    font-size: 0.875rem;
    line-height: 1.65;
    color: #4b5563;
    margin: 0;
}

/* Details Tab */
.card-details-content {
    padding: 0.25rem 0 0.5rem;
}

.card-details-section {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.card-details-section:last-child {
    border-bottom: none;
}

.card-details-heading {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1f2937;
    margin: 0 0 0.5rem;
}

/* Score Summary (inside Score tab, below dimension rows) */
.card-score-summary {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #f3f4f6;
}
.card-score-summary-heading {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    margin: 0 0 0.375rem;
}

/* Product detail tags */
.card-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
}
.card-detail-tags-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin-right: 0.25rem;
}
.card-detail-tag {
    font-size: 0.75rem;
    font-weight: 500;
    background: #f3f4f6;
    color: #374151;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
}

/* Company meta (founded, HQ) */
.card-company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}
.card-company-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.card-company-meta-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
}

/* Founders */
.card-founders-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.card-founder-item {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
a.card-founder-item {
    color: #2563eb;
    text-decoration: none;
}
a.card-founder-item:hover { text-decoration: underline; }
a.card-founder-item svg { opacity: 0.5; }

/* Revenue tab link block */
.card-inline-link-block {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #7c3aed;
    text-decoration: none;
}
.card-inline-link-block:hover { text-decoration: underline; }

/* Sources Tab */
.card-sources {
    padding: 0.75rem 1.25rem 0.5rem;
}

.card-sources-intro {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    margin: 0 0 1rem;
    line-height: 1.5;
}

.card-sources-group {
    margin-bottom: 1rem;
}

.card-sources-group h4 {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-light);
    margin: 0 0 0.375rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.card-sources-dim {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.card-source-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.375rem;
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.15s;
}

a.card-source-item:hover {
    background: #faf5ff;
}

.card-source-item svg {
    flex-shrink: 0;
    color: #d1d5db;
}

a.card-source-item:hover svg {
    color: var(--color-primary);
}

.card-source-label {
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 100px;
}

.card-source-date {
    font-weight: 400;
    color: var(--color-text-light);
    font-size: 0.75rem;
}

.card-source-url {
    font-size: 0.75rem;
    color: var(--color-text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}


/* Dimension rows — matches scorecard guide style */
.card-dims {
    padding: 0 1rem 0.5rem;
}

.card-dim-row {
    border-bottom: 1px solid #f9fafb;
}
.card-dim-row:last-child { border-bottom: none; }

.card-dim-clickable { cursor: pointer; }
.card-dim-clickable:hover { background: #faf5ff; }

.card-dim-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.card-dim-badge {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 800;
    flex-shrink: 0;
}

.card-dim-name {
    font-size: 0.875rem;
    color: #6b7280;
    white-space: nowrap;
    flex-shrink: 0;
}

.card-dim-val {
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    width: 2.75rem;
    flex-shrink: 0;
}

.card-dim-bar-track {
    flex: 1;
    height: 0.3125rem;
    background: #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
    min-width: 2rem;
}
.card-dim-bar-fill {
    height: 100%;
    border-radius: 9999px;
}

.card-dim-rating {
    font-size: 0.8125rem;
    font-weight: 600;
    width: 3.25rem;
    text-align: right;
    flex-shrink: 0;
}

/* Expandable dim detail */
.card-dim-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.card-dim-expanded .card-dim-detail {
    max-height: 600px;
    overflow-y: auto;
    padding: 0.5rem 0 0.75rem;
}

/* Detail view toggle (Highlights / Full Analysis) */
.detail-view-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 0.625rem;
    background: #f3f4f6;
    border-radius: 0.375rem;
    padding: 0.1875rem;
}
.detail-view-btn {
    flex: 1;
    padding: 0.3125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #9ca3af;
    background: transparent;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.15s;
}
.detail-view-btn.active {
    background: white;
    color: #374151;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Detail views */
.detail-view { display: none; }
.detail-view.active { display: block; }

.highlight-list {
    margin-bottom: 0.375rem;
}

.card-detail-summary {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.card-detail-section {
    margin-bottom: 0.5rem;
}
.card-detail-section:last-child { margin-bottom: 0; }

.card-detail-heading {
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Collapsible strengths / weaknesses / couldn't find */
.card-detail-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    margin: 0 -0.375rem;
    padding: 0.2rem 0.375rem;
    border-radius: 0.3rem;
    transition: background 0.15s ease;
}
.card-detail-toggle:hover { background: rgba(0,0,0,0.05); }
.toggle-chevron {
    flex-shrink: 0;
    transition: transform 0.2s ease;
    opacity: 0.8;
}
.card-detail-collapsible .card-detail-list {
    display: none;
    margin-top: 0.375rem;
}
.card-detail-collapsible.card-detail-open .card-detail-list {
    display: block;
}
.card-detail-open .toggle-chevron {
    transform: rotate(180deg);
}
.card-detail-strength { color: #059669; }
.card-detail-concern { color: #dc2626; }

.card-detail-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.card-detail-list li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text);
}

.card-detail-list li:last-child {
    margin-bottom: 0.125rem;
}

.card-detail-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.card-detail-list li::before { background: #9ca3af; }
.card-list-strengths li::before { background: var(--color-excellent); }
.card-list-concerns li::before { background: var(--color-poor); }
.card-detail-missing li::before { background: #d1d5db; }

/* Colored accents for section headings */
.card-detail-section:has(.card-list-strengths) h4 { color: var(--color-excellent); }
.card-detail-section:has(.card-list-concerns) h4 { color: var(--color-poor); }
.card-detail-missing h4 { color: #9ca3af; }

/* Cap Notice */
.card-cap-notice {
    margin: 0.5rem 1.25rem;
    padding: 0.625rem 0.875rem;
    background: rgba(245, 158, 11, 0.08);
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    color: #92400e;
}

/* Related Products */
.card-related {
    padding: 1rem 1.25rem;
    border-top: 1px solid #f0f0f0;
}
.card-related-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.625rem;
}
.card-related-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.card-related-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.625rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.card-related-item:hover {
    background: #f3f0ff;
}
.card-related-logo {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: contain;
    background: white;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.card-related-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #7c3aed;
    background: #f3f0ff;
}
.card-related-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.card-related-name {
    font-weight: 500;
    font-size: 0.9rem;
}

/* About This Company — founders line */
.card-founders {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.card-founders-label {
    color: #6b7280;
    font-size: 0.8rem;
}

.card-founders-sep {
    color: #9ca3af;
    font-size: 0.75rem;
}

.card-founder-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

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

.card-founder-name {
    font-weight: 600;
    color: var(--color-text);
}

/* (duplicate .card-company-meta removed — see earlier definition) */

.card-company-chip {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 0.2rem 0.625rem;
}

/* About This Company — product links inside card-summary */
.card-company-products {
    margin-top: 0.75rem;
}
.card-company-also {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.card-company-product-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.card-company-product-link:hover {
    background: #f3f0ff;
}
.card-company-product-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    flex: 1;
}

/* Card Footer — like the card brand/year strip */
.card-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #eeeeee;
    background: linear-gradient(135deg, #faf9ff 0%, #f6fffe 100%);
}

.card-tags {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.card-tag {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    background: rgba(167, 139, 250, 0.1);
    color: var(--color-primary);
    border-radius: 4px;
}

.card-footer-right {
    display: contents;
}

.card-eval-date {
    font-size: 0.75rem;
    color: var(--color-text);
    font-weight: 600;
    text-align: center;
}

.card-brand {
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-primary);
    text-align: center;
}

/* Below-card elements */
.card-cta {
    text-align: center;
    margin: 1.5rem 0;
}

.card-btn-visit {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--color-primary);
    color: white;
    font-weight: 700;
    border-radius: 9999px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.3);
}

.card-btn-visit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.card-methodology {
    background: #f9fafb;
    border-radius: 0.875rem;
    padding: 1.25rem;
    margin: 0.5rem 0 2rem;
}

.card-methodology h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--color-text);
}

.card-methodology p {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--color-text);
    margin: 0 0 0.375rem;
}

.card-legend {
    display: flex;
    gap: 1rem;
    margin: 0.625rem 0;
    flex-wrap: wrap;
}

.card-legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--color-text);
}

.card-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.card-method-fine {
    color: var(--color-text-light) !important;
    font-size: 0.75rem !important;
}

/* ==========================================
   End Scorecard
   ========================================== */

/* Admin Styles */
.admin-container {
    padding: var(--spacing-lg) var(--spacing-md);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.stats-grid {
    display: flex;
    gap: 0.75rem;
    margin-bottom: var(--spacing-lg);
    justify-content: center;
}

.stats-grid .stat-card {
    flex: 0 1 180px;
}

.stat-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    text-align: center;
    border-top: 3px solid var(--color-primary);
}

.stat-card:nth-child(2) {
    border-top-color: var(--color-excellent);
}

.stat-card:nth-child(3) {
    border-top-color: var(--color-secondary);
}

.stat-card:nth-child(4) {
    border-top-color: var(--color-accent);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
}

.stat-card:nth-child(2) .stat-number {
    color: var(--color-excellent);
}

.stat-card:nth-child(3) .stat-number {
    color: var(--color-secondary);
}

.stat-card:nth-child(4) .stat-number {
    color: var(--color-accent);
}

.stat-label {
    color: #374151;
    font-size: 0.8125rem;
}

.dashboard-intro {
    font-size: 1.25rem;
    color: var(--color-text);
    margin: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header-actions {
    display: flex;
    gap: 0.5rem;
}

/* Admin Tab Navigation */
.admin-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--color-border);
}

.admin-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--color-text-light);
    border-bottom: 2px solid transparent;
    position: relative;
    bottom: -2px;
    transition: all 0.2s ease;
}

.admin-tab:hover {
    color: var(--color-text);
    background: rgba(167, 139, 250, 0.05);
}

.admin-tab-active {
    color: var(--color-text);
    font-weight: 600;
    border-bottom-color: var(--color-primary);
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    color: var(--color-text-light);
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    padding: 0 0.35rem;
}

.action-coming-soon-pub { color: #d97706; }
.action-duplicate { color: #6366f1; }
.action-archive { color: var(--color-good); }

.archive-reason-select {
    font-size: 0.8125rem;
    padding: 0.3rem 0.5rem;
    min-width: 0;
    width: auto;
}

.archive-reason-input {
    font-size: 0.8125rem;
    padding: 0.3rem 0.5rem;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-box {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-box h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.25s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1), 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 5;
}

/* Textareas expand on focus to show full content */
textarea.form-control {
    min-height: 4.5rem;
    resize: vertical;
}

textarea.form-control:focus {
    min-height: 10rem;
}

.form-section {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

/* Logo Upload */
.logo-upload-area {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 0.5rem;
}

.logo-preview {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 2px dashed var(--color-border);
    background: var(--color-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.logo-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--color-text-light);
}

.logo-preview-placeholder span {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.logo-upload-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}

.logo-upload-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.logo-or {
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.logo-url-input {
    flex: 1;
    min-width: 180px;
    font-size: 0.8125rem !important;
    padding: 0.375rem 0.625rem !important;
}

/* Step Navigation */
.step-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: var(--spacing-lg);
    padding: 1rem 0;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-light);
    transition: all 0.2s;
}

.step-item a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.8125rem;
    background: var(--color-bg-alt);
    border: 2px solid var(--color-border);
    color: var(--color-text-light);
}

.step-active {
    color: var(--color-text);
    font-weight: 600;
}

.step-active .step-number {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.step-completed .step-number {
    background: var(--color-excellent);
    border-color: var(--color-excellent);
    color: white;
}

.step-clickable:hover {
    color: var(--color-primary);
}

.step-clickable:hover .step-number {
    border-color: var(--color-primary);
}

.step-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.step-divider {
    width: 40px;
    height: 2px;
    background: var(--color-border);
    margin: 0 0.25rem;
}

/* AI Suggestion Box */
.ai-suggestion-box {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.06), rgba(110, 231, 183, 0.06));
    border: 1px solid rgba(167, 139, 250, 0.25);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.ai-suggestion-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.ai-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.625rem;
    background: rgba(167, 139, 250, 0.15);
    color: #7c3aed;
    border-radius: 9999px;
}

.ai-suggested-score {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary);
}

.ai-suggestion-content {
    margin-bottom: 1rem;
}

.ai-reasoning {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.ai-detail-row {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--color-text-light);
    margin-bottom: 0.375rem;
}

.ai-detail-row:empty {
    display: none;
}

.ai-suggestion-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-accept {
    background: var(--color-excellent);
    color: white;
    border: none;
}

.btn-accept:hover {
    background: #059669;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-decline {
    background: transparent;
    color: var(--color-text-light);
    border: 1px solid var(--color-border);
}

.btn-decline:hover {
    background: var(--color-bg-alt);
    color: var(--color-text);
    border-color: var(--color-text-light);
}

/* AI Decision Badges (shown in dimension header) */
.ai-decision-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ai-badge-accepted {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.ai-badge-declined {
    background: rgba(107, 114, 128, 0.1);
    color: var(--color-text-light);
}

/* Dimension header right side */
.dimension-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Dimension section headers on sources form */
.dimension-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dimension-section-header h2 {
    margin-bottom: 0;
}

.dimension-section-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
}

.security-tag { background: #3b82f6; }
.accuracy-tag { background: var(--color-accuracy); }
.foundation-tag { background: var(--color-primary); }
.equity-tag { background: var(--color-secondary); color: var(--color-text); }

.dimension-section-security { border-left: 3px solid #3b82f6; }
.dimension-section-accuracy { border-left: 3px solid var(--color-accuracy); }
.dimension-section-foundation { border-left: 3px solid var(--color-primary); }
.dimension-section-equity { border-left: 3px solid var(--color-secondary); }

/* Evidence fields header (What to Look For) */
.evidence-fields-header {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.evidence-fields-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.evidence-fields-header p {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    margin: 0;
}

.evidence-field textarea {
    font-size: 0.875rem;
    min-height: 3.5rem;
    transition: all 0.25s ease;
}

.evidence-field textarea:focus {
    min-height: 10rem;
}

/* Research status */
.research-status {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}
.research-loading {
    color: var(--color-primary);
    background: rgba(167, 139, 250, 0.1);
}
.research-success {
    color: var(--color-excellent);
    background: rgba(16, 185, 129, 0.1);
}
.research-error {
    color: var(--color-poor);
    background: rgba(239, 68, 68, 0.1);
}

/* Small button variant */
.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

/* Accordion sections */
.accordion-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s;
    border-radius: 0.5rem;
    padding: 0.5rem;
    margin: -0.5rem;
    margin-bottom: 0;
}
.accordion-header:hover {
    background-color: var(--color-bg-alt);
}
.accordion-chevron {
    transition: transform 0.25s ease;
    color: var(--color-text-light);
    flex-shrink: 0;
}
.accordion-chevron.open {
    transform: rotate(180deg);
}
.accordion-body {
    padding-top: 1rem;
}

/* Completion indicator */
.completion-indicator {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: rgba(107, 114, 128, 0.1);
    color: var(--color-text-light);
}
.completion-partial {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}
.completion-complete {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

/* General Links 3-column grid */
.general-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

/* URL fields 2-column grid */
.url-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 var(--spacing-md);
}

/* Evidence fields area with subtle background */
.evidence-fields-area {
    background: var(--color-bg-alt);
    border-radius: 0.5rem;
    padding: 1rem var(--spacing-md);
    margin-top: 0.5rem;
}

/* Search link items (Find Links feature) */
.search-link-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    font-size: 0.8125rem;
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.search-link-item:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* AI-filled field styling */
.ai-filled {
    color: #3b82f6 !important;
}
.ai-field-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

textarea.ai-filled {
    border-left: 3px solid #3b82f6;
    background: rgba(59, 130, 246, 0.03);
}

@media (max-width: 768px) {
    .general-links-grid,
    .url-fields-grid {
        grid-template-columns: 1fr;
    }
    .toolbar-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .dimension-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .dimension-header-right {
        width: 100%;
        justify-content: flex-end;
    }
}

/* AI assist section */
.ai-assist-section {
    margin-bottom: 1rem;
}

.ai-loading {
    margin-top: 0.5rem;
    color: var(--color-primary);
    font-size: 0.875rem;
}


/* Links box */
.links-box h2 {
    margin-bottom: 0.25rem;
}
.links-box-desc {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}
.links-box-desc strong {
    color: var(--color-text);
}
.links-textarea {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.875rem;
    line-height: 1.7;
    resize: vertical;
    min-height: 160px;
}
.links-box-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.links-box-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.links-box-actions span {
    font-size: 0.8125rem;
    color: var(--color-text-light);
}

/* Categorized links (collapsible detail view) */
.categorized-links {
    margin-top: 1rem;
}
.categorized-details {
    border-top: 1px solid var(--color-border);
    padding-top: 0.75rem;
}
.categorized-details summary {
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-light);
    padding: 0.25rem 0;
    user-select: none;
}
.categorized-details summary:hover {
    color: var(--color-text);
}
.categorized-details summary span {
    font-weight: 400;
}
.categorized-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem var(--spacing-md);
    margin-top: 0.75rem;
}
.categorized-grid .form-group {
    margin-bottom: 0.25rem;
}
.categorized-grid label {
    font-size: 0.75rem;
    margin-bottom: 0.125rem;
}
.categorized-textareas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem var(--spacing-md);
    margin-top: 0.5rem;
}
.categorized-textareas .form-group {
    margin-bottom: 0.25rem;
}
.categorized-textareas label {
    font-size: 0.75rem;
    margin-bottom: 0.125rem;
}
.form-control-sm {
    font-size: 0.8125rem !important;
    padding: 0.375rem 0.625rem !important;
}
@media (max-width: 768px) {
    .categorized-grid {
        grid-template-columns: 1fr;
    }
    .categorized-textareas {
        grid-template-columns: 1fr;
    }
    .links-box-footer {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Dimension accordion sections */
.dimension-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.dimension-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.dimension-body {
    padding-top: 1rem;
}

/* Quick-add / Auto-detect section */
.quick-add-section {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.quick-add-section h2 {
    margin: 0.5rem 0 0.25rem;
    font-size: 1.1rem;
}

.quick-add-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.quick-add-icon {
    color: var(--primary);
}

.quick-add-input-row {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.quick-add-input-row .form-control {
    flex: 1;
}

.detect-status {
    font-size: 0.875rem;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}
.detect-status:empty {
    display: none;
}
.detect-loading {
    color: var(--color-primary);
    background: rgba(167, 139, 250, 0.1);
}
.detect-success {
    color: var(--color-excellent);
    background: rgba(16, 185, 129, 0.1);
}
.detect-error {
    color: var(--color-poor);
    background: rgba(239, 68, 68, 0.1);
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
#detect-spinner, #deep-search-spinner {
    animation: spin 1.5s linear infinite;
}

/* Agent progress bar */
.agent-progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin: 0.75rem 0 0.5rem;
}
.agent-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), #4f9d8e);
    border-radius: 2px;
    transition: width 0.5s ease;
    animation: agent-pulse 2s ease-in-out infinite;
    width: 0%;
}
@keyframes agent-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}
.agent-progress-text {
    font-size: 0.8125rem;
    color: var(--color-text-light);
}

/* Research sources list */
.research-sources { margin-top: 0.75rem; }
.research-sources details { font-size: 0.8125rem; }
.research-sources summary {
    cursor: pointer;
    color: var(--color-text-light);
    font-weight: 600;
    padding: 0.25rem 0;
}
.research-sources summary:hover { color: var(--color-text); }
.sources-list {
    list-style: none;
    padding: 0.5rem 0 0 0;
    margin: 0;
}
.sources-list li {
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}
.sources-list li a {
    color: var(--color-primary);
    text-decoration: none;
    word-break: break-all;
}
.sources-list li a:hover { text-decoration: underline; }
.source-ok {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--color-excellent);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.0625rem 0.375rem;
    border-radius: 3px;
    flex-shrink: 0;
}
.source-fail {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--color-poor);
    background: rgba(239, 68, 68, 0.1);
    padding: 0.0625rem 0.375rem;
    border-radius: 3px;
    flex-shrink: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.form-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

/* Category checkboxes */
.checkbox-filter {
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    width: 100%;
}
.checkbox-filter:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.15);
}
.selected-count {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: rgba(167, 139, 250, 0.1);
    color: var(--color-primary);
    margin-left: 0.25rem;
}
.category-group.filter-hidden {
    display: none;
}
.checkbox-label.filter-hidden {
    display: none !important;
}
.category-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.category-group {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.category-group-name {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400 !important;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* Category tags display */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.category-tag {
    display: inline-block;
    background: rgba(167, 139, 250, 0.1);
    color: #7c3aed;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

/* Classification guidance callout */
.classification-guide {
    margin-top: 0.75rem;
}
.cls-guide-card {
    font-size: 0.825rem;
    line-height: 1.55;
    padding: 0.6rem 0.875rem;
    border-radius: 0.5rem;
    border-left: 3px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
}
.cls-guide-default { border-left-color: #d1d5db; background: #f9fafb; }
.cls-guide-medical { border-left-color: #60a5fa; background: #eff6ff; }
.cls-guide-wellness { border-left-color: #34d399; background: #ecfdf5; }

/* Founders structured rows */
.founder-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}
.founder-row .founder-name { flex: 1; }
.founder-row .founder-url { flex: 2; }
.founder-remove-btn {
    flex-shrink: 0;
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #9ca3af;
    font-size: 1.1rem;
    line-height: 1;
}
.founder-remove-btn:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }

/* Contacts structured rows */
.contact-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}
.contact-row .contact-name { flex: 1; }
.contact-row .contact-role { flex: 1; }
.contact-row .contact-info { flex: 1.5; }
.contact-row .contact-notes { flex: 1.5; }

/* Source coverage summary */
.coverage-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.coverage-summary-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}
.coverage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.coverage-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.coverage-dim-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
}
.coverage-dim-status { font-size: 0.75rem; }
.cov-ok { color: #059669; font-weight: 500; }
.cov-partial { color: #92400e; }
.cov-missing { color: #9ca3af; }
.coverage-note {
    font-size: 0.775rem;
    color: #9ca3af;
    margin: 0;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.6rem;
}

/* Classification badges */
.classification-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 0.375rem;
}

.classification-medical {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.classification-wellness {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

/* Product type tags */
.category-tag.type-tag {
    background: rgba(251, 113, 133, 0.1);
    color: #e11d48;
}

/* Scoring form - classification info bar */
.classification-info-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(167, 139, 250, 0.05);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

.weight-info {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Weighted total preview (sticky) */
.weighted-total-preview {
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
    border: 2px solid var(--color-primary);
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-scores {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.preview-item {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
}

.preview-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-light);
}

.preview-value {
    font-size: 1.5rem;
    font-weight: 800;
}

.preview-max {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.band-preview-excellent { color: var(--color-excellent); }
.band-preview-good { color: var(--color-good); }
.band-preview-poor { color: var(--color-poor); }

.cap-warning {
    margin-top: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Sub-criteria grid */
.sub-criteria-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sub-criterion-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg-alt);
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
}

.sc-label {
    flex: 1;
    min-width: 0;
}

.sc-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.sc-range {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-light);
}

/* Scoring guidance tooltip */
.sc-help-wrapper {
    display: inline-block;
    position: relative;
    margin-left: 0.25rem;
    vertical-align: middle;
}
.sc-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 9999px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #6b7280;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.sc-help-btn:hover { background: #e5e7eb; color: #374151; }
.sc-guidance-tip {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 100;
    width: 280px;
    background: #1f2937;
    color: #f9fafb;
    font-size: 0.775rem;
    line-height: 1.5;
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    white-space: normal;
}
.sc-guidance-tip.open { display: block; }

/* Missing vs N/A helper text */
.sc-status-help {
    font-size: 0.775rem;
    color: #6b7280;
    margin: 0.5rem 0 0;
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    border-radius: 0.375rem;
    line-height: 1.5;
}

/* Dimension status badge */
.dim-status-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: 9999px;
    letter-spacing: 0.01em;
}
.status-not-started { background: #f3f4f6; color: #9ca3af; }
.status-in-progress { background: #fef3c7; color: #92400e; }
.status-done { background: #d1fae5; color: #065f46; }

.sc-inputs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.sc-score-input {
    width: 4.5rem !important;
    text-align: center;
    padding: 0.375rem !important;
}

.sc-status-select {
    width: 7rem !important;
    padding: 0.375rem 0.25rem !important;
    font-size: 0.8125rem !important;
}

/* Dimension total bar */
.dimension-total-bar {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid var(--color-border);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.dt-label {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.dt-value {
    font-size: 1.25rem;
    font-weight: 800;
}

.dt-max {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.dt-band {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
}

.band-strong { background: rgba(16, 185, 129, 0.1); color: #059669; }
.band-mixed { background: rgba(245, 158, 11, 0.1); color: #b45309; }
.band-concern { background: rgba(239, 68, 68, 0.1); color: #dc2626; }

/* Dimension form header with weight badge */
.dimension-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dimension-form-header h2 {
    margin-bottom: 0;
}

.weight-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    background: rgba(167, 139, 250, 0.1);
    color: #7c3aed;
    border-radius: 9999px;
}

/* Public scorecard - threshold cap notice */
.cap-notice {
    padding: 1rem 1.25rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 0.75rem;
    color: #92400e;
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

/* Public scorecard - missing info section */
.missing-info-section {
    background: rgba(107, 114, 128, 0.05);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
}

.missing-info-section h4 {
    color: var(--color-text-light);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.missing-info-list {
    margin: 0.375rem 0 0 1.25rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.missing-info-list li {
    margin-bottom: 0.25rem;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    background: white;
    font-size: 0.875rem;
    color: var(--color-text);
    cursor: pointer;
    min-width: 160px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.2);
}

/* Tables */
.admin-table {
    width: 100%;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
}

.admin-table th {
    background: linear-gradient(135deg, #faf5ff, #f0fdfa);
    font-weight: 600;
    border-bottom: 2px solid var(--color-primary);
}

.admin-table tr {
    border-bottom: 1px solid var(--color-border);
}

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

/* Classification row colors */
.admin-table tbody tr.row-medical {
    background-color: #eff6ff;
    border-left: 3px solid #3b82f6;
}

.admin-table tbody tr.row-wellness {
    background-color: #f0fdf4;
    border-left: 3px solid #22c55e;
}

.admin-table tbody tr.row-medical:hover {
    background-color: #dbeafe;
}

.admin-table tbody tr.row-wellness:hover {
    background-color: #dcfce7;
}

/* Merged product/company cell */
.product-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-cell-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.product-cell-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
}

.product-cell-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.product-cell-company {
    font-size: 0.8rem;
    color: #6b7280;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.published {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-excellent);
}

.status-badge.draft {
    background: rgba(107, 114, 128, 0.1);
    color: var(--color-text-light);
}

.score-pill {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.score-pill.score-none {
    background: var(--color-bg-alt);
    color: var(--color-text-light);
}

.score-pill.score-excellent {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-excellent);
}

.score-pill.score-good {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-good);
}

.score-pill.score-poor {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-poor);
}

/* Actions list in dashboard table */
.actions-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.action-link {
    display: block;
    padding: 0.25rem 0;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}

.action-link:hover {
    opacity: 0.7;
}

.action-edit { color: var(--color-primary); }
.action-report { color: var(--color-excellent); }
.action-unpublish { color: var(--color-good); }
.action-delete { color: var(--color-poor); }
.action-score { color: #7c3aed; }
.action-publish { color: var(--color-excellent); }

/* Action buttons row + overflow menu */
.action-btns {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.action-menu {
    position: relative;
}
.action-menu-btn {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 0.15rem 0.5rem;
    cursor: pointer;
    color: #9ca3af;
    font-size: 1rem;
    line-height: 1.4;
    letter-spacing: 0.05em;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.action-menu-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
}
.action-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    min-width: 170px;
    z-index: 200;
    padding: 0.375rem 0;
}
.action-menu-dropdown.open { display: block; }
.action-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.4rem 1rem;
    font-size: 0.8125rem;
    color: #374151;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.1s ease;
    white-space: nowrap;
}
.action-menu-item:hover { background: #f9fafb; color: #111827; }
.action-menu-item-danger { color: #dc2626; }
.action-menu-item-danger:hover { background: #fef2f2; color: #b91c1c; }
.action-menu-item-warning { color: #d97706; }
.action-menu-item-warning:hover { background: #fffbeb; }
.action-menu-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 0.25rem 0;
}

/* Product name links in table */
.product-name-link {
    color: var(--color-primary);
    text-decoration: none;
}

.product-name-link:hover {
    text-decoration: underline;
}

.product-name-link-edit {
    color: var(--color-text);
    text-decoration: none;
}

.product-name-link-edit:hover {
    color: var(--color-primary);
}

/* Product cell with inline logo */
.product-cell-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-logo-inline {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: white;
    flex-shrink: 0;
}

.product-logo-inline img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

/* Smaller secondary text under table cells */
.table-subtext {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 0.125rem;
}

/* Footer */
footer {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3, .footer-section h4 {
    margin-bottom: var(--spacing-sm);
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--color-text-light);
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-light);
    font-size: 0.875rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.breadcrumb {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
}

.breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: var(--spacing-md);
    z-index: 1000;
    max-width: 400px;
}

.alert {
    padding: var(--spacing-md);
    border-radius: 0.5rem;
    margin-bottom: var(--spacing-sm);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.alert-error {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

/* ── Directory: results bar + view toggle ───────────────────────── */
.directory-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 36rem;
    margin: 0.5rem auto 0;
    padding: 0 0.25rem;
}
.directory-results {
    font-size: 0.875rem;
    color: #9ca3af;
}
.view-toggle {
    display: flex;
    gap: 0.25rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    padding: 0.2rem;
}
.view-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 0.375rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    transition: all 0.15s ease;
}
.view-btn.active {
    background: white;
    color: #374151;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.view-btn:hover:not(.active) { color: #6b7280; }

/* ── Directory: list view ───────────────────────────────────────── */
.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
.products-grid.list-view .product-card {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    transform: none !important;
}
.products-grid.list-view .product-card:hover {
    transform: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
}
.products-grid.list-view .product-card-top {
    flex-shrink: 0;
    margin-bottom: 0;
    min-width: 10rem;
    max-width: 12rem;
}
.products-grid.list-view .product-card-logo {
    width: 56px;
    height: 56px;
    min-width: 56px;
}
.products-grid.list-view .product-card-logo img {
    max-height: 56px;
}
.products-grid.list-view .product-card-logo-placeholder {
    width: 56px;
    height: 56px;
    min-width: 56px;
    font-size: 1.375rem;
}
.products-grid.list-view .product-card-name {
    font-size: 1.1rem;
    font-weight: 700;
}
.products-grid.list-view .product-card-company {
    font-size: 0.8rem;
}
.products-grid.list-view .score-circle-sm {
    width: 80px;
    height: 80px;
}
.products-grid.list-view .score-circle-sm .sc-num {
    font-size: 1.6rem;
}
.products-grid.list-view .score-circle-sm .sc-max {
    font-size: 0.6rem;
}
.products-grid.list-view .product-card-score {
    flex: 1;
    margin: 0;
    padding: 0;
    border-top: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.products-grid.list-view .score-circle-sm {
    flex-shrink: 0;
}
.products-grid.list-view .dim-bars {
    flex: 1;
}
.products-grid.list-view .product-card-actions {
    flex-shrink: 0;
    padding-top: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.375rem;
}
.products-grid.list-view .coming-soon-ribbon {
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.6rem;
}

/* ── Directory: card actions + compare button ───────────────────── */
.product-card-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-top: auto;
    padding-top: 1rem;
    gap: 0.375rem;
}
.product-card-cta-link {
    display: block;
    text-align: center;
    padding: 0.5rem 1.25rem;
    border: 2px solid #7c3aed;
    border-radius: 9999px;
    color: #7c3aed;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    z-index: 1;
}
.product-card-cta-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
}
.product-card-cta-link:hover {
    background: #7c3aed;
    color: white;
}
.compare-coming-soon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    background: transparent;
    color: #9ca3af;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    position: relative;
    z-index: 2;
    transition: border-color 0.15s, color 0.15s;
}
.compare-coming-soon-btn:hover {
    border-color: #d1d5db;
    color: #6b7280;
}
/* Coming Soon popup */
.compare-coming-soon-popup {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 10;
}
.compare-coming-soon-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1f2937;
}
.compare-coming-soon-popup.visible {
    opacity: 1;
}
.product-card.compare-selected {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

/* ── Compare bar ────────────────────────────────────────────────── */
.compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1f2937;
    color: white;
    padding: 0.875rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
.compare-bar.visible { transform: translateY(0); }
.compare-bar-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.compare-bar-label {
    font-size: 0.875rem;
    color: #9ca3af;
    white-space: nowrap;
}
.compare-bar-products {
    flex: 1;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.compare-bar-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(255,255,255,0.1);
    border-radius: 9999px;
    padding: 0.2rem 0.625rem 0.2rem 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
}
.compare-bar-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}
.compare-bar-btn {
    background: #7c3aed;
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
}
.compare-bar-btn:hover { background: #6d28d9; }
.compare-bar-btn:disabled { background: #4b5563; cursor: not-allowed; }
.compare-bar-clear {
    background: none;
    border: 1.5px solid rgba(255,255,255,0.25);
    color: #9ca3af;
    padding: 0.5rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}
.compare-bar-clear:hover { border-color: white; color: white; }

/* ── Compare modal ──────────────────────────────────────────────── */
.compare-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.compare-modal-overlay.open {
    display: flex;
}
.compare-modal {
    background: white;
    border-radius: 1rem;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
}
.compare-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}
.compare-modal-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}
.compare-modal-close {
    background: none;
    border: none;
    font-size: 1.125rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.15s;
}
.compare-modal-close:hover { color: #374151; }
.compare-modal-body {
    padding: 1.5rem;
    overflow-x: auto;
}
.compare-table {
    display: grid;
    gap: 0;
    min-width: 480px;
}
.compare-cell {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}
.compare-cell:last-child { border-bottom: none; }
.compare-row-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    display: flex;
    align-items: center;
    background: #fafafa;
    border-right: 1px solid #f3f4f6;
}
.compare-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
    background: #fafafa;
}
.compare-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    border: 1px solid #f3f4f6;
}
.compare-logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    color: #6b7280;
}
.compare-product-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1f2937;
    text-decoration: none;
}
.compare-product-name:hover { color: #7c3aed; text-decoration: underline; }
.compare-product-co {
    font-size: 0.75rem;
    color: #9ca3af;
}
.compare-score {
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
}
.compare-band {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.compare-dim-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    text-align: center;
}
.compare-dim-val {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1;
}
.compare-dim-bar-track {
    width: 100%;
    max-width: 80px;
    height: 5px;
    background: #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
}
.compare-dim-bar-fill {
    height: 100%;
    border-radius: 9999px;
}

/* ── Scorecard: hero meta (year + country) ──────────────────────── */
.card-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}
.card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 9999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.65rem;
    color: #111827;
    line-height: 1.4;
}
.card-meta-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

/* ── Scorecard: dim row expand chevron ──────────────────────────── */
.card-dim-chevron {
    flex-shrink: 0;
    color: #9ca3af;
    transition: transform 0.2s ease;
    margin-left: 0.25rem;
}
.card-dim-expanded .card-dim-chevron {
    transform: rotate(180deg);
}
.card-dim-clickable:hover .card-dim-chevron {
    color: #7c3aed;
}

/* Score page — product & company context boxes */
.score-context-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .score-context-row { grid-template-columns: 1fr; }
}

.score-context-box {
    background: #f9fafb;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.875rem 1rem;
}

.score-context-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 0.375rem;
}

.score-context-text {
    font-size: 0.875rem;
    color: var(--color-text);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.score-context-empty {
    font-size: 0.875rem;
    color: #9ca3af;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.score-context-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.score-context-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    background: #e5e7eb;
    border-radius: 9999px;
    color: #374151;
}

.score-context-link {
    font-size: 0.75rem;
    color: var(--color-primary);
    text-decoration: none;
    word-break: break-all;
    display: block;
    margin-top: 0.25rem;
}

.score-context-link:hover { text-decoration: underline; }

.score-context-field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.score-context-box .form-control {
    font-size: 0.875rem;
}

/* Score All Dimensions toolbar */
.score-all-toolbar {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.score-all-toolbar .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.score-all-desc {
    font-size: 0.8125rem;
    color: var(--color-text-light);
}

.score-all-toolbar #score-all-progress {
    flex-basis: 100%;
}

/* Sub-criteria accordion */
.sc-details {
    border: none;
    margin: 0;
}

.sc-details summary {
    list-style: none;
}

.sc-details summary::-webkit-details-marker {
    display: none;
}

.sc-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-light);
    padding: 0.5rem 0;
    user-select: none;
}

.sc-toggle:hover {
    color: var(--color-text);
}

.sc-chevron {
    transition: transform 0.2s ease;
}

.sc-details[open] .sc-chevron {
    transform: rotate(180deg);
}

/* Notes & Evidence accordion */
.notes-details {
    border: none;
    margin: 0;
}

.notes-details summary {
    list-style: none;
}

.notes-details summary::-webkit-details-marker {
    display: none;
}

.notes-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-light);
    padding: 0.75rem 0 0.5rem;
    user-select: none;
    border-top: 1px solid var(--color-border);
    margin-top: 0.5rem;
}

.notes-toggle:hover {
    color: var(--color-text);
}

.notes-chevron {
    transition: transform 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.notes-details[open] .notes-chevron {
    transform: rotate(180deg);
}

.notes-preview {
    font-weight: 400;
    color: #9ca3af;
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .product-header-full {
        flex-direction: column;
    }

    .nav-menu {
        gap: var(--spacing-sm);
    }

    .dimension-header {
        flex-direction: column;
    }
}

/* ==========================================
   Evaluate Page — Side-by-Side Layout
   ========================================== */

.eval-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.eval-header h1 { font-size: 1.5rem; font-weight: 800; margin: 0; }
.eval-company { color: #6b7280; font-size: 0.875rem; margin: 0.125rem 0 0.375rem; }

/* Sticky Score Preview */
.eval-score-preview {
    position: sticky;
    top: 0;
    z-index: 50;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.625rem;
    padding: 0.625rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.eval-preview-total {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}
.eval-preview-num { font-size: 1.5rem; font-weight: 800; }
.eval-preview-denom { font-size: 0.875rem; color: #9ca3af; }
.eval-preview-band {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    margin-left: 0.5rem;
}
.eval-band-excellent { background: #d1fae5; color: #065f46; }
.eval-band-good { background: #fef3c7; color: #92400e; }
.eval-band-poor { background: #fee2e2; color: #991b1b; }
.eval-band-strong { background: #d1fae5; color: #065f46; }
.eval-band-mixed { background: #fef3c7; color: #92400e; }
.eval-band-concern { background: #fee2e2; color: #991b1b; }
.eval-preview-dims {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: #6b7280;
}
.eval-preview-dim strong { color: #1f2937; }

/* Dimension Tabs */
.eval-dim-tabs {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}
.eval-dim-tab {
    padding: 0.625rem 1rem;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.eval-dim-tab:hover { color: #374151; }
.eval-dim-tab.active {
    color: var(--dim-color);
    border-bottom-color: var(--dim-color);
}
.eval-dim-tab-score {
    font-size: 0.6875rem;
    font-weight: 700;
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}
.eval-dim-tab.active .eval-dim-tab-score {
    background: color-mix(in srgb, var(--dim-color) 12%, white);
    color: var(--dim-color);
}

/* Dimension Panels */
.eval-dim-panel { display: none; }
.eval-dim-panel.active { display: block; }

/* Two-Column Layout */
.eval-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}
.eval-col-research {
    position: sticky;
    top: 5rem;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    padding-right: 0.5rem;
}
.eval-col-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

/* Sections */
.eval-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}
.eval-section:last-child { border-bottom: none; }
.eval-section-heading {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.5rem;
}
.eval-section-heading svg { color: #9ca3af; flex-shrink: 0; }

/* Collapsible sections */
.eval-section-toggle {
    cursor: pointer;
    user-select: none;
}
.eval-section-toggle:hover {
    color: #7c3aed;
}
.eval-section-chevron {
    transition: transform 0.2s ease;
}
.eval-collapsible.collapsed .eval-section-chevron {
    transform: rotate(-90deg);
}
.eval-collapsible.collapsed .eval-section-body {
    display: none;
}

/* Generate Summary button */
.eval-gen-summary-btn {
    font-size: 0.625rem !important;
    padding: 1px 8px !important;
    margin-left: 0.5rem;
    vertical-align: middle;
    gap: 0.25rem;
    display: inline-flex;
    align-items: center;
}
.eval-gen-summary-btn svg {
    color: #7c3aed;
}

/* PDF Upload */
.eval-pdf-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #7c3aed;
    background: white;
    border: 1.5px solid #c4b5fd;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s ease;
}
.eval-pdf-upload-label:hover {
    background: #f5f3ff;
    border-color: #7c3aed;
}
.eval-pdf-filename {
    font-size: 0.6875rem;
    color: #6b7280;
    font-style: italic;
}

/* Research Links */
.eval-link-count, .eval-summary-count {
    font-size: 0.6875rem;
    font-weight: 500;
    color: #9ca3af;
    margin-left: 0.25rem;
}
.eval-section-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: -0.25rem 0 0.5rem 0;
    line-height: 1.4;
}
/* Consolidated Research Links Section */
.eval-research-consolidated {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.eval-research-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.eval-research-header .eval-col-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.eval-research-chevron {
    transition: transform 0.2s ease;
}
.eval-research-consolidated.collapsed .eval-research-chevron {
    transform: rotate(-90deg);
}
.eval-research-consolidated.collapsed .eval-research-body {
    display: none;
}
.eval-research-consolidated.collapsed .eval-research-header {
    margin-bottom: 0;
}
.eval-research-consolidated.collapsed .eval-research-actions {
    display: none;
}
.eval-research-consolidated.collapsed .eval-notes-doc-row {
    display: none;
}

/* Notes Doc Link */
.eval-notes-doc-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    border-radius: 0.5rem;
}
.eval-notes-doc-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.8125rem;
    color: #1e40af;
    outline: none;
    padding: 0.25rem 0;
}
.eval-notes-doc-input::placeholder {
    color: #93a3d1;
}
.eval-notes-doc-input:focus {
    background: white;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    margin: -0.25rem -0.5rem;
    border: 1px solid #818cf8;
}
.eval-notes-doc-open {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: #4f46e5;
    background: white;
    border: 1px solid #c7d2fe;
    flex-shrink: 0;
    transition: background 0.15s ease;
}
.eval-notes-doc-open:hover {
    background: #eef2ff;
}

.eval-research-actions {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}
.eval-link-filters {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}
.eval-filter-chip {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
}
.eval-filter-chip:hover { border-color: #9ca3af; }
.eval-filter-chip.active {
    background: var(--chip-bg, #f3f4f6);
    color: var(--chip-color, #374151);
    border-color: var(--chip-color, #9ca3af);
}
.eval-filter-separator {
    width: 1px;
    height: 1rem;
    background: #d1d5db;
    margin: 0 0.25rem;
}
/* Link status toggle */
.eval-link-status {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.875rem;
    color: #d1d5db;
    padding: 0;
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
    line-height: 1;
}
.eval-link-status:hover { color: #059669; }
.eval-link-status.reviewed { color: #059669; }
.eval-link-reviewed { border-left: 2px solid #059669; }
/* Dimension badge on link */
.eval-link-dim-badge {
    font-size: 0.5625rem;
    font-weight: 700;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    background: #f3f4f6;
    color: #9ca3af;
    flex-shrink: 0;
    min-width: 1rem;
    text-align: center;
}
.eval-dim-badge-security { background: #ede9fe; color: #7c3aed; }
.eval-dim-badge-accuracy { background: #ccfbf1; color: #0d9488; }
.eval-dim-badge-foundation { background: #fce7f3; color: #be185d; }
.eval-dim-badge-equity { background: #ffedd5; color: #c2410c; }
/* Inline edit form */
.eval-link-edit-form {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #e5e7eb;
}
.eval-link-edit-form .eval-link-form-row {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 0.375rem;
    align-items: flex-start;
}
.eval-link-dim-select {
    padding: 0.375rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    background: white;
    min-width: 120px;
}

.eval-link-form {
    margin-bottom: 0.5rem;
}
.eval-link-form-row {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 0.375rem;
    align-items: flex-start;
}
.eval-link-title-input {
    flex: 1;
    min-width: 100px;
    padding: 0.375rem 0.625rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
}
.eval-link-title-input:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124,58,237,0.1); }
.eval-link-type-select {
    padding: 0.375rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    background: white;
    min-width: 110px;
}
.eval-link-notes-input {
    flex: 1;
    min-width: 120px;
    padding: 0.375rem 0.625rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    resize: vertical;
}
.eval-link-notes-input:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124,58,237,0.1); }

.eval-research-link {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 0.5rem 0.625rem;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
}
.eval-link-top {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.eval-link-type-badge {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    background: #f3f4f6;
    color: #6b7280;
}
.eval-link-type-privacy_policy { background: #ede9fe; color: #6d28d9; }
.eval-link-type-terms { background: #ede9fe; color: #6d28d9; }
.eval-link-type-research { background: #ecfdf5; color: #047857; }
.eval-link-type-news { background: #fff7ed; color: #c2410c; }
.eval-link-type-regulatory { background: #fef2f2; color: #991b1b; }
.eval-link-type-app_listing { background: #eff6ff; color: #1d4ed8; }
.eval-link-type-social { background: #fdf2f8; color: #be185d; }
.eval-link-general-badge {
    font-size: 0.5625rem;
    background: #dbeafe;
    color: #1e40af;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    font-weight: 600;
    white-space: nowrap;
}
.eval-link-url {
    flex: 1;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.eval-link-url:hover { text-decoration: underline; }
.eval-link-url svg { flex-shrink: 0; opacity: 0.5; }
.eval-link-delete {
    border: none;
    background: none;
    color: #d1d5db;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    flex-shrink: 0;
}
.eval-link-delete:hover { color: #ef4444; }
.eval-link-notes {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    line-height: 1.4;
    padding-left: 0.25rem;
    border-left: 2px solid #e5e7eb;
}
.eval-link-actions {
    margin-top: 0.25rem;
}
.eval-link-action-btn {
    font-size: 0.6875rem;
    color: #7c3aed;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
}
.eval-link-action-btn:hover { text-decoration: underline; }
.eval-summary-source-link {
    font-size: 0.6875rem;
    color: #7c3aed;
    text-decoration: none;
    margin-left: 0.375rem;
}
.eval-summary-source-link:hover { text-decoration: underline; }

/* Document Summarizer */
.eval-summarizer {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}
.eval-url-input {
    flex: 1;
    padding: 0.375rem 0.625rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
}
.eval-url-input:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124,58,237,0.1); }

.eval-summary-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.625rem;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
}
.eval-summary-header { font-size: 0.8125rem; margin-bottom: 0.25rem; }
.eval-summary-text { color: #4b5563; line-height: 1.5; margin: 0.25rem 0; }
.eval-summary-relevant { color: #1f2937; background: #ede9fe; padding: 0.375rem 0.5rem; border-radius: 0.25rem; margin-top: 0.375rem; line-height: 1.4; }
.eval-summary-flag { padding: 0.25rem 0.5rem; border-radius: 0.25rem; margin-top: 0.25rem; font-size: 0.75rem; line-height: 1.4; }
.eval-flag-red { background: #fef2f2; color: #991b1b; }
.eval-flag-green { background: #f0fdf4; color: #166534; }
.eval-summary-delete {
    border: none;
    background: none;
    color: #d1d5db;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
}
.eval-summary-delete:hover { color: #ef4444; }
.eval-summary-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.eval-cached-badge { font-size: 0.625rem; background: #e5e7eb; color: #6b7280; padding: 0.1rem 0.3rem; border-radius: 0.25rem; font-weight: 600; }

/* Evidence Clips */
.eval-clip-form { margin-bottom: 0.5rem; }
.eval-clip-input {
    width: 100%;
    padding: 0.375rem 0.625rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    resize: vertical;
    margin-bottom: 0.375rem;
}
.eval-clip-input:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124,58,237,0.1); }
.eval-clip-form-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.eval-clip-source {
    flex: 1;
    min-width: 120px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.75rem;
}
.eval-clip-company-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: #6b7280;
    white-space: nowrap;
}
.eval-clip-company-toggle input { width: 14px; height: 14px; }

.eval-clip {
    position: relative;
    background: white;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #9ca3af;
    border-radius: 0.375rem;
    padding: 0.5rem 0.625rem;
    padding-right: 1.5rem;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
}
.eval-clip-strength { border-left-color: #10b981; }
.eval-clip-concern { border-left-color: #ef4444; }
.eval-clip-neutral { border-left-color: #7c3aed; }
.eval-clip-quote { color: #374151; line-height: 1.4; cursor: default; }
.eval-clip-quote:hover { background: #f9fafb; border-radius: 0.25rem; }
.eval-clip-meta { display: flex; align-items: center; gap: 0.375rem; margin-top: 0.25rem; flex-wrap: wrap; }
.eval-clip-source-link { font-size: 0.6875rem; color: #7c3aed; text-decoration: none; word-break: break-all; }
.eval-clip-source-link:hover { text-decoration: underline; }
.eval-clip-sentiment-badge {
    font-size: 0.5625rem; padding: 0.1rem 0.375rem; border-radius: 0.25rem;
    font-weight: 600; cursor: pointer; text-transform: capitalize; user-select: none;
}
.eval-clip-sent-strength { background: #d1fae5; color: #065f46; }
.eval-clip-sent-concern { background: #fee2e2; color: #991b1b; }
.eval-clip-sent-neutral { background: #ede9fe; color: #5b21b6; }
.eval-clip-sent-none { background: #f3f4f6; color: #9ca3af; }
.eval-clip-company-badge { font-size: 0.5625rem; background: #dbeafe; color: #1e40af; padding: 0.1rem 0.3rem; border-radius: 0.25rem; font-weight: 600; display: inline-block; }
.eval-clip-delete {
    position: absolute;
    top: 0.25rem;
    right: 0.375rem;
    border: none;
    background: none;
    color: #d1d5db;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.125rem;
}
.eval-clip-delete:hover { color: #ef4444; }
.eval-clip-inline-edit {
    width: 100%; padding: 0.25rem 0.5rem; border: 1px solid #7c3aed;
    border-radius: 0.25rem; font-size: 0.8125rem; resize: vertical;
    font-family: inherit;
}
.eval-clip-count { font-size: 0.75rem; color: #9ca3af; font-weight: 400; }
.eval-clip-sentiment {
    padding: 0.25rem 0.375rem; border: 1px solid #d1d5db; border-radius: 0.375rem;
    font-size: 0.75rem; background: white; cursor: pointer;
}

/* Notes Textarea */
.eval-notes-textarea {
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    resize: vertical;
    line-height: 1.5;
    min-height: 5rem;
    transition: min-height 0.2s ease;
}
.eval-notes-textarea:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124,58,237,0.1);
    min-height: 12rem;
}

/* Sub-Criterion Blocks */
.eval-sub-criterion {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.625rem;
    padding: 0.875rem;
    margin-bottom: 0.75rem;
}
.eval-sub-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}
.eval-sub-label { font-weight: 700; font-size: 0.875rem; flex: 1; }
.eval-sub-score { font-weight: 800; font-size: 1rem; color: #7c3aed; }
.eval-sub-max { font-size: 0.75rem; color: #9ca3af; }
.eval-sub-guide {
    font-size: 0.75rem;
    color: #9ca3af;
    line-height: 1.4;
    margin-bottom: 0.625rem;
    font-style: italic;
}

/* Questions */
.eval-question {
    padding: 0.5rem 0;
    border-top: 1px solid #f3f4f6;
}
.eval-question:first-of-type { border-top: none; }
.eval-question-text {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1f2937;
    margin: 0 0 0.125rem;
    line-height: 1.4;
}
.eval-question-guide {
    font-size: 0.6875rem;
    color: #9ca3af;
    margin: 0 0 0.375rem;
    line-height: 1.3;
}

/* Answer Buttons */
.eval-answer-btns {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.eval-answer-btn {
    padding: 0.3rem 0.625rem;
    border: 1.5px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.12s;
    color: #374151;
}
.eval-answer-btn:hover { border-color: #9ca3af; }
.eval-answer-pts {
    font-size: 0.5625rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Selected states */
.eval-ans-yes.selected { background: #d1fae5; border-color: #10b981; color: #065f46; }
.eval-ans-yes.selected .eval-answer-pts { color: #065f46; }
.eval-ans-no.selected { background: #fee2e2; border-color: #ef4444; color: #991b1b; }
.eval-ans-no.selected .eval-answer-pts { color: #991b1b; }
.eval-ans-unclear.selected { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.eval-ans-unclear.selected .eval-answer-pts { color: #92400e; }
.eval-ans-na.selected { background: #f3f4f6; border-color: #6b7280; color: #4b5563; }

/* Override */
.eval-override {
    margin-top: 0.5rem;
    padding-top: 0.375rem;
    border-top: 1px dashed #e5e7eb;
    font-size: 0.75rem;
    color: #9ca3af;
}
.eval-override label { display: flex; align-items: center; gap: 0.375rem; }
.eval-override-input {
    width: 3.5rem;
    padding: 0.2rem 0.375rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    text-align: center;
}

/* Dimension Total */
.eval-dim-total {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}
.eval-dim-total-label { font-weight: 600; font-size: 0.875rem; }
.eval-dim-total-score { font-weight: 800; font-size: 1.25rem; }
.eval-dim-total-max { font-size: 0.75rem; color: #9ca3af; }
.eval-dim-total-band {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    margin-left: auto;
}

/* Scorecard Notes */
.eval-scorecard-notes .form-group { margin-bottom: 0.625rem; }
.eval-scorecard-notes label { font-size: 0.75rem; font-weight: 600; color: #6b7280; margin-bottom: 0.25rem; display: block; }
.eval-scorecard-notes .form-control {
    font-size: 0.8125rem;
    padding: 0.375rem 0.625rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    width: 100%;
}

/* Footer / Actions */
.eval-footer-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
}
.eval-footer-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.eval-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Scorecard Preview (Step 3) */
.preview-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}
.preview-card-wrap {
    position: sticky;
    top: 1rem;
}
.preview-section-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.75rem;
}
.preview-edit-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.preview-edit-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
}
.preview-edit-heading {
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.preview-edit-score {
    font-size: 0.75rem;
    font-weight: 600;
    background: #e5e7eb;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
}
.preview-edit-hint {
    font-size: 0.6875rem;
    font-weight: 400;
    color: #9ca3af;
}
.preview-edit-section .form-group {
    margin-bottom: 0.5rem;
}
.preview-edit-section .form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.25rem;
    display: block;
}
.preview-edit-section .form-control {
    font-size: 0.8125rem;
    padding: 0.375rem 0.5rem;
}
.preview-edit-view-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid #e5e7eb;
}
.preview-edit-view-tag {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.preview-edit-view-tag-highlights {
    background: #dbeafe;
    color: #1d4ed8;
}
.preview-edit-view-tag-full {
    background: #ede9fe;
    color: #6d28d9;
}
.preview-sources-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-top: 0.5rem;
}
.preview-source-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}
.preview-source-dim {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
    flex-shrink: 0;
    background: #e5e7eb;
    color: #6b7280;
}
.preview-source-dim.security-tag { background: #ede9fe; color: #7c3aed; }
.preview-source-dim.accuracy-tag { background: #ccfbf1; color: #0d9488; }
.preview-source-dim.foundation-tag { background: #fce7f3; color: #be185d; }
.preview-source-dim.equity-tag { background: #ffedd5; color: #c2410c; }
.preview-source-dim.general-tag { background: #e5e7eb; color: #6b7280; }
.preview-source-link {
    color: var(--color-primary);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.preview-source-link:hover { text-decoration: underline; }

.preview-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}
.preview-dim-findings {
    padding: 0.375rem 0 0.375rem 2rem;
}

@media (max-width: 1024px) {
    .preview-layout {
        grid-template-columns: 1fr;
    }
    .preview-card-wrap {
        position: static;
    }
}

/* Responsive: stack columns on smaller screens */
@media (max-width: 1024px) {
    .eval-columns {
        grid-template-columns: 1fr;
    }
    .eval-col-research {
        position: static;
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }
    .eval-preview-dims { display: none; }
    .eval-footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================
   Mobile — 430px and below
   ========================================== */
@media (max-width: 430px) {

    /* Card page — tighter horizontal padding */
    .card-page {
        padding: 0.75rem 0.75rem 2rem;
    }

    /* Card hero — horizontal layout on mobile to save vertical space */
    .card-hero {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        padding: 1rem;
        gap: 0.75rem;
    }
    .card-hero-info-block {
        align-items: flex-start;
        text-align: left;
    }
    .card-avatar {
        width: 52px;
        height: 52px;
        flex-shrink: 0;
    }
    .card-avatar-placeholder span {
        font-size: 1.25rem;
    }
    .card-name {
        font-size: 1.1rem;
    }
    .card-brief-desc {
        font-size: 0.75rem;
    }

    /* Card tabs — scrollable row on small screens */
    .card-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 0.5rem;
        scrollbar-width: none;
        gap: 0.125rem;
    }
    .card-tabs::-webkit-scrollbar { display: none; }

    .card-tab {
        padding: 0.625rem 0.625rem;
        font-size: 0.75rem;
        white-space: nowrap;
        flex: 1 1 0;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        border-radius: 0.375rem 0.375rem 0 0;
    }
    .card-tab:not(.active) {
        color: #7c3aed;
        background: #f5f3ff;
    }

    /* Dimension rows — smaller font so Security & Privacy fits on one line */
    .card-dim-name {
        font-size: 0.75rem;
    }
    .card-dim-val {
        width: 2.25rem;
        font-size: 0.6875rem;
    }
    .card-dim-rating {
        width: 2.75rem;
        font-size: 0.625rem;
    }

    /* Product directory grid — 2 columns on mobile */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }

    /* Compact product cards for 2-col layout */
    .product-card {
        padding: 0.75rem;
        border-radius: 0.75rem;
    }
    .product-card-top {
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    .product-card-logo {
        width: 48px;
        height: 48px;
        border-radius: 10px;
        flex-shrink: 0;
    }
    .product-card-logo-placeholder {
        font-size: 1.125rem;
    }
    .product-card-name {
        font-size: 1rem;
        line-height: 1.25;
    }
    .product-card-company {
        font-size: 0.75rem;
    }
    .product-card-tags {
        display: none;
    }
    .product-card-score {
        flex-direction: column;
        align-items: center;
        gap: 0.375rem;
        padding: 0.5rem 0.375rem;
        margin: 0.375rem 0;
    }
    .score-circle-sm {
        width: 58px;
        height: 58px;
        border-width: 3px;
    }
    .score-circle-sm .sc-num {
        font-size: 1.25rem;
    }
    .score-circle-sm .sc-num {
        font-size: 1.125rem;
    }
    /* Hide dim bars — too cramped at this width; show compact pills instead */
    .dim-bars {
        display: none;
    }
    .dim-compact {
        display: flex;
    }
    .product-card-cta {
        padding-top: 0.5rem;
    }
    .product-card-cta a {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    .product-card-actions {
        padding-top: 0.5rem;
        gap: 0.25rem;
    }
    .product-card-cta-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.675rem;
        border-width: 1.5px;
    }
    .compare-coming-soon-btn {
        padding: 0.2rem 0.5rem;
        font-size: 0.6rem;
    }

    /* Directory search bar — full width */
    .directory-search-bar {
        max-width: 100%;
    }
    .directory-search-bar button {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    /* Directory filters — stack vertically */
    .directory-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .directory-filters select {
        width: 100%;
    }

    /* Nav dropdowns — cap width on mobile */
    .public-nav-dropdown-menu {
        width: min(14rem, calc(100vw - 2rem));
        max-height: 60vh;
        overflow-y: auto;
    }

    /* Breadcrumb — smaller font, allow wrapping */
    .breadcrumb {
        font-size: 0.8125rem;
        word-break: break-word;
    }
}
