/* AI Brand Authority Index */
:root {
    --bg: #fff;
    --text: #1a1a2e;
    --muted: #6b7280;
    --border: #e5e7eb;
    --accent: #2563eb;
    --accent-light: #eff6ff;
    --green: #059669;
    --orange: #d97706;
    --purple: #7c3aed;
    --card-bg: #f9fafb;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --mono: "SF Mono", "Fira Code", monospace;
}

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

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 15px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

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

.logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.tagline {
    font-size: 13px;
    color: var(--muted);
}

/* Hero */
.hero {
    text-align: center;
    padding: 48px 0 32px;
}

.hero h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--muted);
    font-size: 16px;
    margin-bottom: 24px;
}

/* Search */
.search-box {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    outline: none;
    font-family: var(--font);
}

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

.autocomplete-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    overflow: hidden;
}

.ac-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: var(--accent-light); }
.ac-name { font-weight: 500; }
.ac-meta { font-size: 13px; color: var(--muted); }

/* Stats */
.stats-row {
    display: flex;
    gap: 16px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.stat {
    flex: 1;
    min-width: 140px;
    text-align: center;
    padding: 20px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    font-family: var(--mono);
}

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

/* Methodology */
.methodology {
    margin: 32px 0;
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.methodology h2 { font-size: 18px; margin-bottom: 12px; }
.methodology p { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.methodology p:last-child { margin-bottom: 0; }

/* Tables */
.brands-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 48px;
}

.brands-table th,
.brands-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.brands-table th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.brands-table a { color: var(--accent); text-decoration: none; }
.brands-table a:hover { text-decoration: underline; }

.rank-col { width: 50px; font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-both { background: #dcfce7; color: #166534; }
.badge-gemini { background: #ede9fe; color: #5b21b6; }
.badge-cc { background: #fef3c7; color: #92400e; }

/* Brand Detail */
.breadcrumb {
    padding: 16px 0;
    font-size: 13px;
    color: var(--muted);
}

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

.brand-header {
    margin-bottom: 24px;
}

.brand-header h1 {
    font-size: 28px;
    margin-bottom: 4px;
}

.brand-domain {
    margin-bottom: 8px;
}

.brand-domain a { color: var(--accent); text-decoration: none; }
.brand-domain a:hover { text-decoration: underline; }

/* Score Cards */
.score-cards {
    display: flex;
    gap: 16px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.score-card {
    flex: 1;
    min-width: 180px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
}

.score-card.primary {
    background: var(--accent-light);
    border-color: var(--accent);
}

.score-label {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.score-value {
    font-size: 32px;
    font-weight: 700;
    font-family: var(--mono);
}

.score-rank {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

/* Detail Sections */
.detail-section {
    margin: 32px 0;
}

.detail-section h2 {
    font-size: 18px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.detail-section h3 {
    font-size: 15px;
    margin: 16px 0 8px;
}

.section-note {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 12px;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table td,
.detail-table th {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    white-space: nowrap;
}

.detail-table td:first-child {
    font-weight: 500;
    color: var(--muted);
    padding-right: 24px;
    white-space: nowrap;
}

.assoc-table {
    width: 100%;
    border-collapse: collapse;
}

.assoc-table th,
.assoc-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    text-align: left;
}

.assoc-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.assoc-table a { color: var(--accent); text-decoration: none; }
.assoc-table a:hover { text-decoration: underline; }

/* Discovery breadcrumb */
.discovery-breadcrumb {
    font-size: 14px;
    color: var(--muted);
}

.discovery-breadcrumb a { color: var(--accent); text-decoration: none; }
.discovery-breadcrumb a:hover { text-decoration: underline; }
.discovery-level { font-size: 12px; color: var(--muted); }

/* 3-column detail layout */
.detail-columns {
    display: flex;
    gap: 24px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.detail-col {
    flex: 1 1 45%;
}

.detail-col h2 {
    font-size: 18px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.detail-col h3 {
    font-size: 15px;
    margin: 16px 0 8px;
}

/* Side-by-side associations */
.assoc-side-by-side {
    display: flex;
    gap: 24px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.assoc-half {
    flex: 1;
    min-width: 140px;
}

.assoc-half h2 {
    font-size: 16px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--border);
}

/* Highlight row */
.highlight-row {
    background-color: rgba(0, 128, 0, 0.1);
}

.highlight-row td {
    font-weight: bold;
}

/* Footer */
footer {
    margin-top: 48px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
}

footer p { margin-bottom: 4px; }
footer a { color: var(--accent); text-decoration: none; }

/* Responsive */
@media (max-width: 640px) {
    .hero h1 { font-size: 24px; }
    .stats-row { flex-direction: column; }
    .score-cards { flex-direction: column; }
    .brands-table { font-size: 13px; }
    .brands-table th:nth-child(n+6),
    .brands-table td:nth-child(n+6) { display: none; }
}
