/**
 * Sub-Processors.com Styles
 * Clean, modern design inspired by Google
 */

:root {
    --bg: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f4;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-tertiary: #80868b;
    --border: #dadce0;
    --border-light: #e8eaed;
    --accent: #1a73e8;
    --accent-hover: #1557b0;
    --accent-light: #e8f0fe;
    --success: #34a853;
    --success-light: #e6f4ea;
    --warning: #fbbc04;
    --error: #ea4335;
    --error-light: #fce8e6;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg);
    min-height: 100vh;
}

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

/* ========== Homepage ========== */
body.home {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Soft sky blue from corners – clearly blue, not grey */
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 120% 80% at 0% 0%, rgba(200, 225, 255, 0.6) 0%, transparent 55%),
        radial-gradient(ellipse 100% 70% at 100% 0%, rgba(210, 230, 255, 0.5) 0%, transparent 50%),
        radial-gradient(ellipse 80% 50% at 50% 100%, rgba(225, 238, 255, 0.35) 0%, transparent 45%);
}

/* Top nav: full width bar */
.home-nav {
    border-bottom: 1px solid var(--border-light);
    background: var(--bg);
}
.home-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.home-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
}
.home-logo .logo-icon {
    width: 28px;
    height: 28px;
}
.home-logo:hover {
    color: var(--text-primary);
    text-decoration: none;
}
.home-nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}
.home-nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
}
.home-nav-links a:hover {
    color: var(--accent);
}
.home-nav-cta {
    padding: 8px 16px !important;
    background: var(--accent) !important;
    color: white !important;
    border-radius: var(--radius-full);
}
.home-nav-cta:hover {
    background: var(--accent-hover) !important;
    color: white !important;
}

/* Home main container: use more page width */
body.home .home-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 32px 64px;
    text-align: center;
}

/* Home two-column layout: main + right panel */
.home-layout {
    display: block;
    max-width: 1040px;
    margin: 0 auto;
}
.home-main {
    min-width: 0;
    text-align: center;
}

/* Top search block: narrower, centered (hero + search + suggestions) */
.home-search-section {
    max-width: 640px;
    margin: 0 auto 32px;
}
.home-main .hero-section,
.home-main .home-search-card,
.home-main .home-trusted,
.home-main .home-stats-strip,
.home-main .home-signals-intro {
    text-align: center;
}
.home-main .home-signals,
.home-main .home-why {
    text-align: center;
}
.home-main .home-signals .home-signal-block,
.home-main .home-why .home-why-grid {
    text-align: left;
}

/* Popular Subprocessors: under search */
.home-popular {
    margin-top: 28px;
    margin-bottom: 32px;
    text-align: center;
}
.home-popular-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
}
.home-popular-title a {
    color: inherit;
    text-decoration: none;
}
.home-popular-title a:hover {
    color: var(--accent);
}
.home-popular-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 12px;
}
.home-popular-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.home-popular-chip:hover {
    background: var(--bg-tertiary);
    border-color: var(--border);
    color: var(--accent);
}
.home-popular-count {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}
.home-popular-chip:hover .home-popular-count {
    color: var(--accent);
    opacity: 0.9;
}
.home-popular-more {
    display: inline-block;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
}
.home-popular-more:hover {
    text-decoration: underline;
}
.home-columns-single {
    grid-template-columns: 1fr;
    max-width: 100%;
}
.home-columns-single .home-section {
    max-width: 100%;
}

/* Hero: two-line hierarchy (tagline lighter, headline bolder) */
.hero-section {
    margin-bottom: 36px;
}
.hero-tagline {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.hero-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.15;
    margin-bottom: 0;
    letter-spacing: -0.03em;
}
.hero-sub {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.5;
}

/* Search section (no card – blends with page background) */
.home-search-card {
    padding: 28px 0 24px;
    max-width: 100%;
    margin: 0 auto 28px;
}
.home-search-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}
.home-search-form {
    margin-bottom: 20px;
}
/* Inline search: input + button in one row */
.home-search-inline {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    margin-bottom: 20px;
}
.home-search-inline .search-box {
    flex: 1;
    min-width: 0;
}
.home-search-inline .search-box input {
    border-radius: var(--radius-full);
    padding: 14px 20px 14px 44px;
    font-size: 16px;
}
.home-search-inline .search-btn {
    border-radius: var(--radius-full);
    padding: 14px 24px;
    flex-shrink: 0;
}
.home-search-form .search-box input {
    padding: 14px 44px;
    font-size: 16px;
}
.home-search-cta {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    margin-top: 4px;
}
.home-search-cta:hover {
    text-decoration: underline;
}

/* Suggestions chips (inside card) */
.home-search-card .suggestions-label {
    margin-bottom: 10px;
}
.suggestions-label {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}
.suggestions-desc {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}
.suggestion-chip-count {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-left: 4px;
}
.suggestions-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}
.suggestion-chip {
    display: inline-block;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.suggestion-chip:hover {
    background: var(--bg-tertiary);
    border-color: var(--border);
    color: var(--accent);
}

/* Trusted by (social proof line) */
.home-trusted {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 24px;
    font-weight: 500;
}

/* Stats strip (prominent numbers) */
.home-stats-strip {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 48px;
    font-size: 15px;
    color: var(--text-secondary);
}
.home-stat strong {
    color: var(--text-primary);
    font-weight: 600;
    margin-right: 4px;
}

.home-stat-link {
    color: inherit;
    text-decoration: none;
}
.home-stat-link:hover {
    color: var(--accent);
}
.home-stat-link:hover strong {
    color: var(--accent);
}

/* Signals intro (section heading + one line) */
.home-signals-intro {
    margin-bottom: 40px;
    text-align: center;
}
.home-signals-heading {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.home-signals-desc {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Legacy logo/tagline (other pages) */
.hero { margin-bottom: 28px; }
.logo, a.logo, h1 a.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 0;
    color: #171717;
    text-decoration: none !important;
}
.logo:hover, a.logo:hover, h1 a.logo:hover { text-decoration: none !important; }
.tagline { font-size: 18px; color: #5f6368; margin-top: 12px; font-weight: 400; }

/* ========== Search ========== */
.search-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.search-form.compact {
    flex-direction: row;
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 16px 48px;
    font-size: 16px;
    font-family: var(--font);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.search-box input:hover {
    box-shadow: var(--shadow);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}

.clear-search {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 20px;
    border-radius: 50%;
}

.clear-search:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.search-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    color: white;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--accent-hover);
}

.search-form.compact .search-box input {
    padding: 12px 44px;
    font-size: 14px;
}

.search-form.compact .search-btn {
    padding: 10px 20px;
}

/* ========== Results Header ========== */
.results-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.header-auth {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}
.header-auth a,
.header-logout {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
}
.header-auth a:hover,
.header-logout:hover {
    color: var(--accent);
}
.header-credits {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.logo-small,
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.logo-small .logo-icon {
    width: 24px;
    height: 24px;
}

.logo-small {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #171717;
    text-decoration: none !important;
}

.logo-small:hover {
    text-decoration: none !important;
}

.header-search {
    flex: 1;
    max-width: 400px;
}

.header-search input {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-family: var(--font);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
}

.header-search input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg);
}

/* ========== Results ========== */
.results {
    padding-bottom: 40px;
}

.results-count {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-card {
    display: block;
    padding: 16px 20px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.result-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow);
}

.result-type {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.result-type-company {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.result-type-subprocessor {
    background: rgba(var(--accent-rgb, 59, 130, 246), 0.12);
    color: var(--accent);
}

.result-domain {
    font-size: 16px;
    font-weight: 500;
    color: var(--accent);
}

.result-name {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.result-meta {
    margin-top: 8px;
    font-size: 13px;
}

.subprocessor-count {
    color: var(--text-secondary);
}

.status {
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.status.pending {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.status.scanning {
    background: var(--accent-light);
    color: var(--accent);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results h2 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    text-decoration: none;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #d33426;
}

/* Home stats (legacy) */
.home-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 56px;
}
.dot-sep { color: var(--border); }

/* Signals / feature blocks (copy left, example cards right) */
.home-signals {
    margin-bottom: 56px;
    max-width: 100%;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.home-signal-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 48px;
}
.home-signal-block:last-child {
    margin-bottom: 0;
}
.home-signal-copy {
    padding-top: 8px;
}
.home-signal-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}
.home-signal-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}
.home-signal-cta {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
}
.home-signal-cta:hover {
    text-decoration: underline;
}
.home-signal-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.home-example-card {
    background: #1f2937;
    color: #f9fafb;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-lg);
}
.home-example-card-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 8px;
}
.home-example-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}
.home-example-card-meta {
    font-size: 13px;
    color: #d1d5db;
    margin-bottom: 12px;
}
.home-example-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.home-example-tags span {
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.12);
    border-radius: var(--radius-full);
    color: #e5e7eb;
}
.home-example-card-note {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.45;
    margin: 0;
}

/* Why people use us (criteria + bullet lists) */
.home-why {
    text-align: center;
    margin-bottom: 56px;
}
.home-why-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}
.home-why-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}
.home-why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: left;
    max-width: 100%;
    margin: 0 auto;
}
.home-why-item {
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}
.home-why-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.home-why-item-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.4;
}
.home-why-item ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.home-why-item li {
    margin-bottom: 4px;
}
.home-why-item h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.home-why-item p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Below fold: two columns (normal flow, not fixed) */
.home-below-fold {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: 40px 24px 48px;
    margin: 0 -24px;
}
.home-below-fold .home-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 100%;
    margin: 0 auto;
    text-align: left;
}
.home-below-fold .home-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.home-below-fold .home-section h3 a.section-link {
    color: inherit;
    text-decoration: none;
}
.home-below-fold .home-section h3 a.section-link:hover {
    color: var(--accent);
}

/* Legacy quick link buttons (if used elsewhere) */
.home-quick-links { display: flex; justify-content: center; gap: 12px; margin-bottom: 32px; }
.quick-link-btn {
    padding: 10px 20px; font-size: 14px; font-weight: 500; color: var(--text-primary);
    background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm);
    text-decoration: none; transition: all 0.2s;
}
.quick-link-btn:hover { background: var(--bg-tertiary); border-color: var(--text-tertiary); }
.home-content { width: 100%; margin-top: 24px; }

.company-list-compact {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.company-list-compact li a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.company-list-compact li a:hover {
    color: var(--accent);
}

.subtle-count {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* Legacy styles for compatibility */
.home-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    text-align: left;
    margin-bottom: 48px;
}

.home-section h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.company-list, .subprocessor-list {
    list-style: none;
}

.company-list li, .subprocessor-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.company-list li:last-child, .subprocessor-list li:last-child {
    border-bottom: none;
}

.company-list a {
    display: flex;
    justify-content: space-between;
    color: var(--text-primary);
    text-decoration: none;
}

.company-list a:hover {
    color: var(--accent);
}

.company-list .count {
    color: var(--text-tertiary);
    font-size: 13px;
}

.subprocessor-list li {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sp-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-decoration: none;
    color: inherit;
    padding: 4px 0;
}

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

.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.section-header-inline h2 {
    margin: 0;
}

.view-all {
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
}

.view-all:hover {
    text-decoration: underline;
}

.sp-name {
    font-weight: 500;
    flex: 1;
}

.sp-category {
    font-size: 12px;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.sp-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.empty-state {
    color: var(--text-tertiary);
    font-style: italic;
}

.empty-state a {
    color: var(--accent);
}

.cta-section {
    background: var(--bg-secondary);
    padding: 32px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.cta-section h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ========== Company Page ========== */
.company-detail {
    padding-bottom: 60px;
}

.company-header {
    margin-bottom: 32px;
}

.company-header h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
}

.company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

a.domain,
.company-meta .domain,
.company-meta a.domain {
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none !important;
}

a.domain:hover,
.company-meta .domain:hover,
.company-meta a.domain:hover {
    color: var(--accent);
    text-decoration: none !important;
}

.source-link {
    color: var(--accent);
    text-decoration: none;
}

.source-link:hover {
    text-decoration: underline;
}

.delete-form {
    display: inline;
    margin-left: 16px;
}

.btn-delete {
    padding: 4px 12px;
    font-size: 12px;
    font-family: var(--font);
    color: var(--error);
    background: transparent;
    border: 1px solid var(--error);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-delete:hover {
    background: var(--error);
    color: white;
}

/* Company About Section */
.company-about {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.industry-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.company-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.company-content {
    display: block;
}

/* ========== Subscribe Banner ========== */
.subscribe-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.subscribe-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.subscribe-text strong {
    font-size: 14px;
    color: var(--text-primary);
}

.subscribe-text span {
    font-size: 13px;
    color: var(--text-secondary);
}

.subscribe-inline {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.subscribe-inline input[type="email"] {
    padding: 8px 12px;
    font-size: 14px;
    font-family: var(--font);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    width: 220px;
}

.subscribe-inline input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ========== Tabs ========== */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -1px;
    text-decoration: none;
}

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

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-count {
    display: inline-block;
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    margin-left: 6px;
}

.tab.active .tab-count {
    background: var(--accent-light);
    color: var(--accent);
}

.tabs .tab-usedby-link {
    margin-left: auto;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========== Changes Timeline ========== */
.changes-timeline {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.changes-timeline .change-item {
    padding: 20px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}

.change-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.changes-timeline .change-date {
    font-weight: 600;
    color: var(--text-primary);
}

.changes-timeline .change-summary {
    display: flex;
    gap: 8px;
}

.badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.badge.added {
    background: var(--success-light);
    color: var(--success);
}

.badge.removed {
    background: var(--error-light);
    color: var(--error);
}

.badge.modified {
    background: #fef3cd;
    color: #856404;
}

.changes-timeline .change-details {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 8px;
}

.changes-timeline .change-details li {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.changes-timeline .change-details li.added {
    color: var(--success);
}

.changes-timeline .change-details li.removed {
    color: var(--error);
}

.changes-timeline .change-details li.modified {
    color: var(--text-secondary);
}

.changes-timeline .change-details li.info {
    color: var(--accent);
    font-style: italic;
}

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

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.section-header .count {
    font-size: 14px;
    color: var(--text-tertiary);
}

.filter-bar {
    margin-bottom: 20px;
}

.filter-input {
    width: 100%;
    max-width: 300px;
    padding: 10px 16px;
    font-size: 14px;
    font-family: var(--font);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}

.filter-input:focus {
    outline: none;
    border-color: var(--accent);
}

.category-group {
    margin-bottom: 32px;
}

.category-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.category-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.subprocessor-card {
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}

.subprocessor-card:hover {
    border-color: var(--border);
}

.sp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.subprocessor-card .sp-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.subprocessor-card .sp-country {
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.sp-purpose, .sp-data {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.sp-extra {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.sp-link {
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
}

.sp-link:hover {
    text-decoration: underline;
}

.sp-certs {
    font-size: 11px;
    color: var(--success);
    background: var(--success-light);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.sp-footer {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

/* ========== Subprocessors Table ========== */
.table-wrapper {
    overflow-x: auto;
    margin-top: 16px;
}

.table-inner {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
    box-shadow: 0 0 0 1px var(--border);
}

.subprocessors-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.subprocessors-table th,
.subprocessors-table td {
    padding: 12px 16px;
    text-align: left;
    border: 1px solid var(--border-light);
    vertical-align: top;
}

.subprocessors-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    position: sticky;
    top: 0;
    border-color: var(--border);
}

.subprocessors-table tbody tr:hover {
    background: var(--bg-secondary);
}

/* Subprocessors listing: ensure all 3 columns visible */
.subprocessors-listing-table {
    table-layout: fixed;
}
.subprocessors-listing-table th:nth-child(1),
.subprocessors-listing-table td:nth-child(1) { width: 40%; }
.subprocessors-listing-table th:nth-child(2),
.subprocessors-listing-table td:nth-child(2) { width: 35%; }
.subprocessors-listing-table th:nth-child(3),
.subprocessors-listing-table td:nth-child(3) { width: 25%; }

/* Companies listing: 5 columns */
.companies-listing-table {
    table-layout: fixed;
}
.companies-listing-table th:nth-child(1),
.companies-listing-table td:nth-child(1) { width: 22%; }
.companies-listing-table th:nth-child(2),
.companies-listing-table td:nth-child(2) { width: 12%; }
.companies-listing-table th:nth-child(3),
.companies-listing-table td:nth-child(3) { width: 12%; }
.companies-listing-table th:nth-child(4),
.companies-listing-table td:nth-child(4) { width: 38%; }
.companies-listing-table th:nth-child(5),
.companies-listing-table td:nth-child(5) { width: 16%; }

.companies-listing-table .about-cell {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* About column: full text in hover tooltip when truncated (like subprocessor Purpose) */
.companies-listing-table .companies-about-cell {
    vertical-align: top;
    position: relative;
    overflow: visible;
}
.companies-about-wrap {
    position: relative;
    display: block;
    overflow: visible;
}
.companies-about-wrap .companies-about-inner {
    display: block;
    line-height: 1.5;
}
.companies-about-tooltip {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 6px;
    padding: 8px 12px;
    max-width: 320px;
    background: #202124;
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    border-radius: 6px;
    white-space: normal;
    word-break: break-word;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 1000;
}
.companies-about-wrap.about-truncated:hover .companies-about-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Allow tooltip to extend outside table (avoid clipping) */
.companies-listing .table-inner {
    overflow: visible;
}

/* Prevent unwanted scrollbar on companies table when it fits */
.companies-listing .table-wrapper {
    overflow-x: visible;
}
@media (max-width: 768px) {
    .companies-listing .table-wrapper {
        overflow-x: auto;
    }
}

.companies-listing-table .name-cell,
.recent-companies-table .name-cell {
    white-space: normal;
}

/* Recent companies: constrain name column so long names wrap */
.recent-companies-table td:nth-child(1) {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Recent companies table column widths (7 columns) */
.recent-companies-table {
    table-layout: fixed;
}
.recent-companies-table th:nth-child(1),
.recent-companies-table td:nth-child(1) { width: 14%; }
.recent-companies-table th:nth-child(2),
.recent-companies-table td:nth-child(2) { width: 12%; }
.recent-companies-table th:nth-child(3),
.recent-companies-table td:nth-child(3) { width: 10%; }
.recent-companies-table th:nth-child(4),
.recent-companies-table td:nth-child(4) { width: 22%; }
.recent-companies-table th:nth-child(5),
.recent-companies-table td:nth-child(5) { width: 10%; }
.recent-companies-table th:nth-child(6),
.recent-companies-table td:nth-child(6) { width: 8%; }
.recent-companies-table th:nth-child(7),
.recent-companies-table td:nth-child(7) { width: 24%; }
.recent-companies-table .description-cell {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
}
/* Industry: constrain badge so long names wrap inside the column */
.recent-companies-table td:nth-child(3) {
    overflow-wrap: break-word;
}
.recent-companies-table td:nth-child(3) .category-badge {
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
    box-sizing: border-box;
}
.recent-companies-table td:nth-child(7).source-cell {
    font-size: 12px;
    word-wrap: break-word;
    word-break: break-all;
}
.recent-companies-table .source-cell .source-link {
    display: inline;
}
.recent-companies-table .company-domain-link {
    color: var(--text-tertiary);
    font-size: 13px;
    text-decoration: none;
}
.recent-companies-table .company-domain-link:hover {
    color: var(--accent);
}

.companies-listing-table .company-domain-muted {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 400;
    margin-top: 2px;
}

.subprocessors-table .name-cell {
    font-weight: 500;
    white-space: nowrap;
}

.recent-companies-table .name-cell {
    white-space: normal;
}

.subprocessors-table .name-cell strong {
    color: var(--text-primary);
}

.subprocessors-table .country-cell .country-flag {
    vertical-align: middle;
    margin-right: 6px;
}

.sp-name-link,
.sp-name-link:hover,
.sp-name-link:visited {
    text-decoration: none !important;
    color: inherit;
}

.sp-name-link:hover strong {
    color: var(--accent);
}

.external-link {
    margin-left: 6px;
    color: var(--accent);
    text-decoration: none;
    font-size: 12px;
}

.external-link:hover {
    text-decoration: underline;
}

.certs-badge {
    margin-left: 6px;
    color: var(--success);
    font-size: 12px;
    cursor: help;
}

.dpa-link {
    margin-left: 6px;
    color: #8b5cf6;
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 4px;
    background: #f5f3ff;
    border-radius: 3px;
}

.dpa-link:hover {
    background: #ede9fe;
    text-decoration: none;
}

.privacy-link {
    margin-left: 4px;
    color: #0891b2;
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 4px;
    background: #ecfeff;
    border-radius: 3px;
}

.privacy-link:hover {
    background: #cffafe;
    text-decoration: none;
}

.contact-link {
    margin-left: 6px;
    color: #6b7280;
    text-decoration: none;
    font-size: 12px;
}

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

.category-badge {
    display: inline-block;
    padding: 3px 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.sp-seen {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* ========== Sidebar ========== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.change-history, .subscribe-section {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.change-history h3, .subscribe-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.changes-list {
    list-style: none;
}

.change-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.change-date {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.change-summary {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.change-summary .added {
    color: var(--success);
    font-size: 13px;
    font-weight: 500;
}

.change-summary .removed {
    color: var(--error);
    font-size: 13px;
    font-weight: 500;
}

.change-summary .modified {
    color: var(--warning);
    font-size: 13px;
    font-weight: 500;
}

.change-details {
    list-style: none;
    font-size: 12px;
}

.change-details li {
    padding: 2px 0;
}

.change-details .added {
    color: var(--success);
}

.change-details .removed {
    color: var(--error);
}

.change-details .modified {
    color: var(--text-secondary);
}

.change-details .more {
    color: var(--text-tertiary);
    font-style: italic;
}

.subscribe-section p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subscribe-form input[type="email"] {
    padding: 10px 12px;
    font-size: 14px;
    font-family: var(--font);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}

.subscribe-form input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ========== Submit Page ========== */
.submit-content {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

.submit-content h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.submit-form {
    margin-bottom: 48px;
}

.form-group {
    margin-bottom: 24px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-family: var(--font);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}

.form-group textarea {
    resize: vertical;
    min-height: 200px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.checkbox-group {
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.hint {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 6px;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: var(--error-light);
    color: var(--error);
}

.alert-warning {
    background: #fef3cd;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
}

/* Extracted URLs display */
.extracted-urls {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.extracted-urls h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

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

.url-list li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    word-break: break-all;
}

.url-list li:last-child {
    border-bottom: none;
}

.url-list a {
    color: var(--accent);
    text-decoration: none;
}

.url-list a:hover {
    text-decoration: underline;
}

.submit-help {
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.submit-help h2 {
    font-size: 18px;
    margin-bottom: 12px;
}

.submit-help p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.submit-help ul {
    margin-left: 20px;
    color: var(--text-secondary);
}

.submit-help code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

/* ========== Not Found ========== */
.not-found {
    text-align: center;
    padding: 80px 20px;
}

.not-found h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.not-found p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.not-found .btn {
    margin: 0 8px;
}

/* ========== Legal pages (Terms, Privacy, Cookies) ========== */
.legal-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 0 48px;
}
.legal-content h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.legal-updated {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 32px;
}
.legal-content section {
    margin-bottom: 28px;
}
.legal-content h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.legal-content p,
.legal-content li {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 10px;
}
.legal-content ul {
    margin: 0 0 12px 0;
    padding-left: 24px;
}
.legal-content a {
    color: var(--accent);
    text-decoration: none;
}
.legal-content a:hover {
    text-decoration: underline;
}

/* ========== Auth (login / signup) ========== */
.auth-content {
    max-width: 400px;
    margin: 0 auto;
    padding: 32px 0 48px;
}
.auth-content h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}
.auth-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}
.auth-form .form-group {
    margin-bottom: 20px;
}
.auth-form .btn-large {
    width: 100%;
    margin-top: 8px;
}
.auth-switch {
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}
.auth-switch a {
    color: var(--accent);
    text-decoration: none;
}
.auth-switch a:hover {
    text-decoration: underline;
}

/* ========== Footer ========== */
footer {
    padding: 24px 0;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 13px;
    border-top: 1px solid var(--border-light);
    margin-top: 40px;
}

/* Ready to dive in? CTA */
.footer-cta {
    margin-top: 48px;
    padding: 40px 0 48px;
    border-top: 1px solid var(--border-light);
}
.footer-cta-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-cta-text {
    flex: 1;
    min-width: 200px;
}
.footer-cta-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.footer-cta-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}
.footer-cta-btn {
    flex-shrink: 0;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font);
    color: white;
    background: var(--accent);
    border-radius: var(--radius);
    text-decoration: none;
    transition: background 0.2s;
}
.footer-cta-btn:hover {
    background: var(--accent-hover);
    color: white;
}

/* Homepage footer (brand + columns + bottom bar) */
.site-footer-home {
    margin-top: 0;
    padding-top: 40px;
    border-top: 1px solid var(--border-light);
}
.site-footer-home .footer-inner {
    display: grid;
    grid-template-columns: auto 1fr 1fr 1fr;
    gap: 48px 64px;
    max-width: 1100px;
    margin: 0 auto 40px;
    padding: 0 32px;
    text-align: left;
    align-items: start;
}
.site-footer-home .footer-brand {
    min-width: 0;
}
.site-footer-home .footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
}
.site-footer-home .footer-logo .logo-icon {
    width: 24px;
    height: 24px;
}
.site-footer-home .footer-logo:hover {
    color: var(--accent);
}
.site-footer-home .footer-col h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}
.site-footer-home .footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-footer-home .footer-col li {
    margin-bottom: 8px;
}
.site-footer-home .footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
}
.site-footer-home .footer-col a:hover {
    color: var(--accent);
}
.site-footer-home .footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 32px 0;
    border-top: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text-tertiary);
}
.site-footer-home .footer-copy {
    margin: 0;
    padding: 0;
    border: none;
}
.site-footer-home .footer-legal {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.site-footer-home .footer-legal a {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 13px;
}
.site-footer-home .footer-legal a:hover {
    color: var(--accent);
}

/* ========== Subprocessors Listing Page ========== */
body.subprocessors-page .container,
body.recent-companies-page .container {
    max-width: 1600px;
    padding-left: 24px;
    padding-right: 24px;
}

.subprocessors-listing {
    padding: 40px 0;
}

.subprocessors-list-inner {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 300px);
    grid-template-areas: "main sidebar";
    gap: 32px;
    align-items: start;
}

.subprocessors-list-main {
    grid-area: main;
    min-width: 0;
}

.subprocessors-list-sidebar {
    grid-area: sidebar;
    min-width: 0;
}

@media (max-width: 900px) {
    .subprocessors-list-inner {
        grid-template-columns: 1fr;
        grid-template-areas: "sidebar" "main";
    }
    .subprocessors-list-sidebar {
        order: -1;
    }
}

.sidebar-categories .category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.category-list-item {
    border-bottom: 1px solid var(--border-light);
}

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

.category-list-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 10px 0;
    font-size: 14px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
}

.category-list-link:hover {
    color: var(--accent);
}

.category-list-item.active .category-list-link {
    font-weight: 600;
    color: var(--accent);
}

.category-list .category-name {
    flex: 1;
    min-width: 0;
}

.category-list .category-count {
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
    font-size: 13px;
}

.category-list-item.active .category-count {
    color: var(--accent);
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.page-header .subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

.page-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Subprocessor page: "Companies that use X" + count box */
.page-header-subprocessor {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.page-header-subprocessor .page-header-main {
    flex: 1;
    min-width: 0;
}

.page-header-subprocessor .page-header-main h1 {
    margin-bottom: 10px;
}

.page-header-subprocessor .page-header-main .category-badge {
    margin-top: 4px;
}

.page-header-subprocessor .view-vendor-subprocessors-link {
    margin-right: 16px;
    align-self: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}

.page-header-subprocessor .view-vendor-subprocessors-link:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

/* Company page: clean header – title, meta, about (blue category + description) */
.page-header-company .page-header-main h1 {
    margin-bottom: 10px;
}

.page-header-company .company-about {
    margin-top: 10px;
}

.page-header-count-box {
    flex-shrink: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 12px 18px;
    text-align: center;
}

.page-header-count-box--empty {
    opacity: 0.7;
}

.subprocessor-empty-message {
    color: var(--text-secondary);
    font-size: 16px;
    margin: 0 0 24px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.page-header-count-num {
    display: block;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.page-header-count-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.company-count {
    font-size: 15px;
    color: var(--text-secondary);
}

.company-count.muted {
    color: var(--text-tertiary);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Chart container */
.chart-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.chart-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
}

.chart-filters .searchable-select {
    min-width: 180px;
}

.chart-container h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* Searchable select dropdown */
.searchable-select {
    position: relative;
    min-width: 220px;
    z-index: 1001;
}

.searchable-select-input {
    width: 100%;
    padding: 8px 12px;
    padding-right: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: white;
    cursor: pointer;
    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='%235f6368' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.searchable-select-input:focus {
    outline: none;
    border-color: var(--accent);
}

.searchable-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    display: none;
    margin-top: 4px;
}

.searchable-select-dropdown.show {
    display: block;
}

.searchable-select-option {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}

.searchable-select-option:hover,
.searchable-select-option.highlighted {
    background: var(--bg-secondary);
}

.searchable-select-option.selected {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 500;
}

.searchable-select-option.hidden {
    display: none;
}

.option-count {
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 400;
    margin-left: 4px;
}

.searchable-select-option.selected .option-count {
    color: var(--accent);
    opacity: 0.7;
}

.chart-container canvas {
    height: 800px !important;
}

/* Subprocessor Visual tab: employee count horizontal bar chart – constrained so it doesn’t stretch */
.employee-count-chart .employee-count-chart__wrapper {
    position: relative;
    max-width: 520px;
    height: 280px;
}
.employee-count-chart canvas {
    height: 280px !important;
    max-height: 280px;
}

/* Subprocessor Visual tab: "Most commonly used alongside" horizontal bar chart */
.used-alongside-chart .used-alongside-chart__wrapper {
    position: relative;
    max-width: 520px;
    height: 320px;
}
.used-alongside-chart canvas {
    height: 320px !important;
    max-height: 320px;
}

.subprocessors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.subprocessor-card {
    display: block;
    padding: 20px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.subprocessor-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sp-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.sp-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sp-category {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
}

.sp-count {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ========== Subprocessor Detail Page ========== */
/* Use more horizontal space than default container (1200px) */
body.subprocessor-detail-page .container {
    max-width: 1600px;
    padding-left: 24px;
    padding-right: 24px;
}

body.subprocessor-detail-page .breadcrumb {
    margin-bottom: 12px;
}

body.subprocessor-detail-page .page-header {
    margin-bottom: 12px;
}

.subprocessor-detail {
    padding: 12px 0 40px;
}

/* Two-column layout: main content left, sidebar right. Explicit grid areas so layout is reliable. */
body.subprocessor-detail-page .subprocessor-detail-inner {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 320px);
    grid-template-areas: "main sidebar";
    gap: 48px;
    align-items: start;
    margin-top: 4px;
}

@media (max-width: 520px) {
    body.subprocessor-detail-page .subprocessor-detail-inner {
        grid-template-columns: 1fr;
        grid-template-areas: "sidebar" "main";
    }
    body.subprocessor-detail-page .subprocessor-detail-sidebar {
        order: -1;
    }
}

body.subprocessor-detail-page .subprocessor-detail-main {
    grid-area: main;
    min-width: 0;
}

body.subprocessor-detail-page .subprocessor-detail-sidebar {
    grid-area: sidebar;
    min-width: 0;
}

/* ========== Company Detail Page ========== */
/* Same page width as subprocessor detail (1600px) */
body.company-detail-page .container {
    max-width: 1600px;
    padding-left: 24px;
    padding-right: 24px;
}

body.company-detail-page .breadcrumb {
    margin-bottom: 12px;
}

body.company-detail-page .page-header {
    margin-bottom: 12px;
}

/* Same two-column layout as subprocessor detail */
body.company-detail-page .company-detail-inner {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 320px);
    grid-template-areas: "main sidebar";
    gap: 48px;
    align-items: start;
    margin-top: 4px;
}

@media (max-width: 520px) {
    body.company-detail-page .company-detail-inner {
        grid-template-columns: 1fr;
        grid-template-areas: "sidebar" "main";
    }
    body.company-detail-page .company-detail-sidebar {
        order: -1;
    }
}

body.company-detail-page .company-detail-main {
    grid-area: main;
    min-width: 0;
}

body.company-detail-page .company-detail-sidebar {
    grid-area: sidebar;
    min-width: 0;
}

.sidebar-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.sidebar-block-head {
    margin-bottom: 12px;
}

.sidebar-block-head .sidebar-title {
    margin-bottom: 2px;
}

.sidebar-block-head .sidebar-subtitle {
    margin-bottom: 10px;
}

.sidebar-btn {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.sidebar-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-tertiary);
}

.sidebar-toggle {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.sidebar-toggle-btn {
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.sidebar-toggle-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.sidebar-toggle-btn.active {
    color: var(--accent);
    background: var(--accent-light);
    border-color: var(--accent);
}

.sidebar-chart-wrapper {
    height: 260px;
    position: relative;
}

.sidebar-map-wrap {
    min-height: 200px;
}

/* Map modal – bounded size, close button always visible in header */
.map-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.map-modal.map-modal--open {
    opacity: 1;
    visibility: visible;
}

.map-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.map-modal-content {
    position: relative;
    width: 100%;
    max-width: 960px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.map-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 12px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
}

.map-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.map-modal-close {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 1;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}

.map-modal-close:hover {
    background: var(--border-light);
}

.map-modal-map {
    flex: 1;
    width: 100%;
    min-height: 320px;
    background: #f3f4f6;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.sidebar-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
}

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

.sidebar-countries .country-list {
    max-height: 320px;
    overflow-y: auto;
}

.sidebar-table-wrapper {
    overflow-x: auto;
}

.sidebar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sidebar-table th,
.sidebar-table td {
    padding: 8px 0;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.sidebar-table th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

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

.sidebar-table-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.country-list-item {
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

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

.country-list-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: inherit;
    text-decoration: none;
    transition: background 0.15s;
}

.country-list-link:hover {
    background: var(--bg-tertiary);
}

.country-list-item--active .country-list-link {
    font-weight: 600;
    color: var(--accent);
}

.country-list .country-flag {
    flex-shrink: 0;
    width: 24px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
}

.country-list .country-name {
    flex: 1;
    color: var(--text-primary);
}

.country-list .country-count {
    font-weight: 600;
    color: var(--text-secondary);
}

.companies-table .country-flag {
    display: inline-block;
    width: 20px;
    height: 15px;
    object-fit: contain;
}

.company-country-cell {
    white-space: nowrap;
}

.company-country-cell .country-flag {
    vertical-align: middle;
    margin-right: 6px;
}

.company-link .company-domain {
    font-size: 12px;
    color: var(--text-tertiary);
}

.breadcrumb {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

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

.breadcrumb a:hover {
    text-decoration: underline;
}

.category-badge.large {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 13px;
    background: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

.filter-chip-icon {
    font-size: 14px;
}

.filter-chip-flag {
    width: 20px;
    height: 15px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 4px;
}

.filter-chip-remove {
    margin-left: 4px;
    padding: 0 2px;
    font-size: 18px;
    line-height: 1;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 2px;
}

.filter-chip-remove:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.companies-table-outer {
    margin: 24px 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    overflow: hidden;
}

.companies-table-wrapper {
    overflow-x: auto;
}

.companies-table-inner {
    min-width: min-content;
}

.companies-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 14px;
    box-sizing: border-box;
}
.companies-table th,
.companies-table td {
    box-sizing: border-box;
    padding: 8px 12px;
    text-align: left;
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.companies-table th:last-child,
.companies-table td:last-child {
    border-right: none;
}

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

.companies-table thead th {
    border-bottom: 1px solid var(--border);
}

.companies-table th:nth-child(1),
.companies-table td:nth-child(1) { width: 20%; }

.companies-table th:nth-child(2),
.companies-table td:nth-child(2) { width: 14%; }

.companies-table th:nth-child(3),
.companies-table td:nth-child(3) { width: 16%; }

.companies-table th:nth-child(4),
.companies-table td:nth-child(4) { width: 10%; }

.companies-table th:nth-child(5),
.companies-table td:nth-child(5) { width: 40%; }

/* Purpose column: max 3 lines with ellipsis; full text in hover tooltip */
.companies-table td:nth-child(5).companies-table-purpose-cell {
    vertical-align: top;
    position: relative;
    overflow: visible;
}
.companies-table-purpose-wrap {
    position: relative;
    display: block;
    max-height: 100%;
    overflow: visible;
}
.companies-table td:nth-child(5) .companies-table-purpose-inner {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    line-height: 1.5;
}
.companies-table-purpose-tooltip {
    position: absolute;
    left: 0;
    bottom: 100%;
    margin-bottom: 6px;
    padding: 8px 12px;
    max-width: 320px;
    background: #202124;
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    border-radius: 6px;
    white-space: normal;
    word-break: break-word;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 20;
}
.companies-table-purpose-wrap.purpose-truncated:hover .companies-table-purpose-tooltip {
    opacity: 1;
    visibility: visible;
}
.companies-table td:nth-child(5) {
    vertical-align: top;
}

.companies-table .company-domain-link {
    color: var(--text-tertiary);
    font-size: 13px;
    text-decoration: none;
}
.companies-table .company-domain-link:hover {
    color: var(--accent);
}

.companies-table-num {
    font-variant-numeric: tabular-nums;
}

.companies-table tbody tr {
    height: 75px !important;
    max-height: 75px !important;
    min-height: 75px !important;
}
.companies-table tbody td {
    line-height: 1.5;
    box-sizing: border-box;
    height: 75px !important;
    max-height: 75px !important;
    min-height: 75px !important;
    overflow: hidden;
    vertical-align: middle;
}
/* Company name + logo: aligned in one column */
.companies-table .company-name-with-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 20px;
}
.companies-table .company-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}
.companies-table tbody td:nth-child(1) .company-link {
    max-height: 100%;
    overflow: hidden;
}
.companies-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.companies-table tbody tr:hover {
    background: var(--bg-secondary);
}

/* Locked company row (reveal for 1 credit) */
.company-row-locked td {
    background: var(--bg-secondary);
    vertical-align: middle;
}
.company-cell-locked {
    position: relative;
    padding: 8px 12px !important;
    vertical-align: middle;
}
.companies-row-hover-msg {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 8px 12px;
    background: #202124;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.company-row-locked:hover .companies-row-hover-msg {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.companies-row-hover-msg-line1 {
    display: block;
    white-space: nowrap;
}
.companies-row-hover-msg-link {
    display: block;
    white-space: nowrap;
    color: #93c5fd;
    text-decoration: none;
    font-weight: 500;
}
.companies-row-hover-msg-link:hover {
    text-decoration: underline;
}
.company-cell-locked .company-locked-placeholder {
    color: var(--text-tertiary);
    user-select: none;
    filter: blur(5px);
}
.company-cell-locked .company-row-locked-actions {
    display: block;
    margin-top: 10px;
}
.company-row-locked .locked-cell-placeholder {
    color: var(--text-tertiary);
    user-select: none;
    filter: blur(5px);
}
.company-row-locked .btn-small {
    margin-right: 8px;
}
.company-row-locked-nocredits {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Pagination below companies table */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 0;
    padding: 20px 12px 20px 12px;
    border-top: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-secondary);
}

.pagination-info {
    flex-shrink: 0;
}
.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.pagination-page {
    white-space: nowrap;
}
.pagination-buttons {
    display: flex;
    gap: 4px;
}
.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: border-color 0.15s, background 0.15s;
}
.pagination-btn:hover:not([style*="opacity:0.5"]) {
    border-color: var(--accent);
    background: var(--bg-secondary);
}

#companies-table-wrapper.pagination-loading {
    opacity: 0.75;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.companies-table .company-link {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    align-items: flex-start;
}

.company-link strong {
    color: var(--text-primary);
}

.company-link:hover strong {
    color: var(--accent);
}

.company-link .domain,
.company-link .company-domain {
    font-size: 12px;
    color: var(--text-tertiary);
}

.company-view-sublist {
    display: block;
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    margin-top: 4px;
}
.company-view-sublist:hover {
    text-decoration: underline;
}

.back-link {
    margin-top: 32px;
}

.back-link a {
    color: var(--accent);
    text-decoration: none;
}

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

/* ========== Related Companies ========== */
.tab-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.related-companies-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.related-company-card {
    display: block;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.related-company-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-company-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.related-company-domain {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.shared-subprocessors {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shared-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
}

.shared-names {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ========== Data Flow Tree ========== */
.data-flow-intro {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-bottom: 24px;
    border-left: 3px solid var(--accent);
}

.data-flow-intro p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

.flow-tree-container {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    overflow: hidden;
}

/* Tree items */
.flow-item {
    border-bottom: 1px solid var(--border-light);
}

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

/* Row layout */
.flow-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    transition: background 0.15s;
}

.flow-row:hover {
    background: var(--bg-secondary);
}

/* Depth-based indentation */
.flow-item.depth-1 > .flow-row { padding-left: 40px; }
.flow-item.depth-2 > .flow-row { padding-left: 64px; }
.flow-item.depth-3 > .flow-row { padding-left: 88px; }
.flow-item.depth-4 > .flow-row { padding-left: 112px; }

/* Children container */
.flow-children[hidden] {
    display: none;
}

.flow-children {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
}

.flow-children .flow-children {
    background: var(--bg-tertiary);
}

/* Toggle button */
.flow-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.flow-toggle:hover {
    background: var(--accent-light);
    border-color: var(--accent);
}

.flow-toggle-icon {
    width: 12px;
    height: 12px;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.flow-toggle[aria-expanded="true"] .flow-toggle-icon {
    transform: rotate(90deg);
}

/* Leaf node indicator (no children) */
.flow-leaf-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.flow-leaf-icon::before {
    content: '';
    width: 5px;
    height: 5px;
    background: var(--border);
    border-radius: 50%;
}

/* Node name link */
.flow-name {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}

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

.flow-name.is-company {
    font-weight: 600;
}

/* Child count badge */
.flow-count {
    font-size: 11px;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 500;
}

.flow-note {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-tertiary);
    text-align: center;
}

/* Loading states */
.flow-loading {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.flow-loading-inline {
    padding: 8px 16px 8px 40px;
    color: var(--text-tertiary);
    font-size: 13px;
    font-style: italic;
}

.flow-empty {
    padding: 8px 16px 8px 40px;
    color: var(--text-tertiary);
    font-size: 13px;
}

.flow-error {
    padding: 8px 16px 8px 40px;
    color: var(--error);
    font-size: 13px;
}

.flow-loop-indicator {
    font-size: 11px;
    color: var(--text-tertiary);
    font-style: italic;
    margin-left: 8px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hero-title { font-size: 28px; }
    .hero-tagline { font-size: 14px; }
    .home-why-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .home-nav-links { gap: 16px; }
    .home-signal-block { grid-template-columns: 1fr; gap: 24px; }
    .home-signal-cards { order: -1; }
    .home-search-inline { flex-direction: column; gap: 12px; }
    .site-footer-home .footer-inner { grid-template-columns: 1fr; text-align: center; gap: 32px; }
    .site-footer-home .footer-brand { text-align: center; }
    .site-footer-home .footer-logo { justify-content: center; }
    .footer-cta-inner { flex-direction: column; text-align: center; }
    .footer-cta-btn { width: 100%; max-width: 200px; text-align: center; }
    .site-footer-home .footer-bottom { flex-direction: column; text-align: center; }
    .site-footer-home .footer-legal { justify-content: center; }
}
@media (max-width: 480px) {
    .hero-title { font-size: 24px; }
    .hero-sub { font-size: 16px; }
    .home-why-grid { grid-template-columns: 1fr; }
    .home-signals-heading { font-size: 22px; }
    body.home .home-container { padding: 32px 16px 48px; }
    .home-below-fold { margin: 0 -16px; padding: 32px 16px 40px; }
    .home-search-card { padding: 20px 20px 20px; margin-left: -4px; margin-right: -4px; }
    .home-stats-strip { gap: 20px; font-size: 14px; }
    .home-nav-links a:not(.home-nav-cta) { font-size: 13px; }
}
@media (max-width: 900px) {
    .subscribe-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .subscribe-inline {
        flex-direction: column;
    }
    
    .subscribe-inline input[type="email"] {
        width: 100%;
    }
    
    .changes-timeline .change-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .logo {
        font-size: 28px;
    }
    
    .stats-bar {
        gap: 24px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .home-columns {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .search-box input {
        padding: 14px 44px;
        font-size: 14px;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .header-search {
        width: 100%;
        max-width: none;
    }
    
    .category-items {
        grid-template-columns: 1fr;
    }
    
    .company-header h1 {
        font-size: 24px;
    }
    
    /* Data Flow tree responsive */
    .flow-row {
        padding: 6px 12px;
        gap: 8px;
    }
    
    .flow-item.depth-1 > .flow-row { padding-left: 32px; }
    .flow-item.depth-2 > .flow-row { padding-left: 52px; }
    .flow-item.depth-3 > .flow-row { padding-left: 72px; }
    
    .flow-name {
        font-size: 12px;
    }
    
    .flow-toggle,
    .flow-leaf-icon {
        width: 20px;
        height: 20px;
    }
    
    .flow-toggle-icon {
        width: 10px;
        height: 10px;
    }
}

/* Company Grid (Recent page) */
.company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.company-card {
    position: relative;
    display: block;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.company-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.company-card-link {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: inherit;
}

.company-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.company-logo-small {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: #f9fafb;
}

.company-card-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.company-domain {
    font-size: 13px;
    color: #6b7280;
}

.company-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.industry-tag {
    font-size: 12px;
    background: #f0f9ff;
    color: #0369a1;
    padding: 4px 8px;
    border-radius: 4px;
}

.subprocessor-count {
    font-size: 12px;
    color: #6b7280;
}

.company-card-date {
    font-size: 12px;
    color: #9ca3af;
}

.company-card-source {
    padding: 10px 16px 14px;
    border-top: 1px solid #f3f4f6;
    font-size: 11px;
    line-height: 1.35;
}

.company-card-source a {
    color: #6b7280;
    text-decoration: none;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
    word-break: break-all;
}

.company-card-source a:hover {
    color: #3b82f6;
}

/* Section link styling */
.section-link {
    color: inherit;
    text-decoration: none;
}

.section-link:hover {
    text-decoration: underline;
}

/* Remove link styling (looks like a link but is a button) */
.remove-link {
    background: none;
    border: none;
    color: #d1d5db;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    opacity: 0.6;
}

.remove-link:hover {
    opacity: 1;
    text-decoration: underline;
}

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

/* ============================================
   Insights Tab - Charts & Visualizations
   ============================================ */

/* Insights stack - vertical layout matching subprocessors page exactly */
.insights-stack {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 20px;
}

.insights-stack .chart-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border);
}

/* Chart wrapper for dynamic height control */
.insights-stack .chart-wrapper {
    position: relative;
    width: 100%;
}

/* Override the global 800px rule - height is set dynamically by JS */
.insights-stack .chart-container canvas {
    height: 100% !important;
    width: 100% !important;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    max-height: 150px;
    overflow-y: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-label {
    color: var(--text-secondary);
}

.legend-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* Insight Stats */
.insight-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

@media (max-width: 768px) {
    .insight-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .insight-stats {
        grid-template-columns: 1fr;
    }
}

/* Market Share Chart */
.market-share-container {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 10px 0;
}

.market-share-chart-wrapper {
    width: 280px;
    height: 280px;
    flex-shrink: 0;
}

.market-share-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.market-share-legend {
    flex: 1;
    display: grid;
    grid-template-rows: repeat(8, auto);
    grid-auto-flow: column;
    gap: 6px;
}

.market-share-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    transition: background 0.15s, transform 0.15s;
    font-size: 13px;
    cursor: pointer;
}

.market-share-legend .legend-item:hover {
    background: var(--bg-tertiary, #e5e7eb);
    transform: translateX(2px);
}

.market-share-legend .legend-color {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.market-share-legend .legend-label {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.market-share-legend .legend-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
}

.market-share-legend .legend-pct {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 12px;
}

@media (max-width: 768px) {
    .market-share-container {
        flex-direction: column;
        gap: 16px;
    }
    
    .market-share-chart-wrapper {
        width: 200px;
        height: 200px;
    }
    
    .market-share-legend {
        width: 100%;
        grid-template-rows: repeat(8, auto);
        grid-auto-flow: column;
    }
}

@media (max-width: 480px) {
    .market-share-legend {
        grid-template-rows: none;
        grid-auto-flow: row;
    }
}
