/* =========================================================
   Behavioural Business Signals — local dev UI stylesheet
   Self-contained, no CDN dependencies.
   ========================================================= */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #1a1a2e;
    background: #ffffff;
    margin: 0;
    padding: 0;
}

/* ── Header ─────────────────────────────────────────────── */

header {
    background: #1a1f36;
    color: #ffffff;
    padding: 24px 32px;
    border-bottom: 3px solid #2d3561;
}

.header-inner h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.subtitle {
    font-size: 13px;
    color: #9ba6c8;
    margin-top: 4px;
}

/* ── Main layout ─────────────────────────────────────────── */

main {
    margin: 0;
    padding: 0;
    background: #ffffff;
}

/* ── Section headers ─────────────────────────────────────── */

.scoreboard-section,
.chart-section {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e6f0;
    padding: 24px;
    margin-bottom: 28px;
}

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

.section-header h2,
.chart-section h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1f36;
}

/* ── Legend chips row ────────────────────────────────────── */

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ── Quadrant chip ───────────────────────────────────────── */

.chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.chip.strong-strong,
.chip.strong--strong {
    background: #d4edda;
    color: #1a6630;
    border: 1px solid #b8ddc0;
}

.chip.weak-weak,
.chip.weak--weak {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f1aeb5;
}

.chip.strong-weak,
.chip.strong--weak,
.chip.weak-strong,
.chip.weak--strong {
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #ffe69c;
}

.chip.pending,
.chip.pending-data {
    background: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
}

/* ── Table ───────────────────────────────────────────────── */

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

table.scoreboard {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

table.scoreboard thead th {
    background: #1a1f36;
    color: #c9d0e8;
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

table.scoreboard tbody tr:nth-child(odd) {
    background: #f7f8fc;
}

table.scoreboard tbody tr:nth-child(even) {
    background: #ffffff;
}

table.scoreboard tbody tr:hover {
    background: #eef0fa;
}

table.scoreboard td {
    padding: 10px 14px;
    border-bottom: 1px solid #e8eaf2;
    vertical-align: middle;
}

td.company-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1f36;
    min-width: 200px;
}

td.ticker {
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 12.5px;
    color: #4a5568;
    font-weight: 600;
}

td.score {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    min-width: 90px;
}

/* ── Chart placeholder ───────────────────────────────────── */

.chart-placeholder {
    background: #f0f2fa;
    border: 2px dashed #c5cce8;
    border-radius: 6px;
    padding: 48px 24px;
    text-align: center;
    margin-top: 16px;
}

.placeholder-label {
    font-size: 15px;
    font-weight: 500;
    color: #4a5568;
}

.placeholder-sub {
    font-size: 12px;
    color: #8899b4;
    margin-top: 8px;
}

/* ── Footer ──────────────────────────────────────────────── */

.page-footer {
    text-align: center;
    color: #8899b4;
    font-size: 12px;
    margin-top: 8px;
    line-height: 1.8;
}

.page-footer strong {
    color: #4a5568;
}

/* =========================================================
   Company detail page styles
   ========================================================= */

/* ── Scoreboard link ─────────────────────────────────────── */

table.scoreboard td a {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a202c;
    text-decoration: none;
}

table.scoreboard td a:hover {
    text-decoration: underline;
}

/* ── Header — flex variant for detail pages ──────────────── */

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

.back-link {
    color: #9ba6c8;
    text-decoration: none;
    font-size: 13px;
    padding: 6px 14px;
    border: 1px solid #3d4870;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.back-link:hover {
    background: #2d3561;
    color: #ffffff;
}

/* ── Generic detail card ─────────────────────────────────── */

.detail-card {
    background: #ffffff;
    border: 1px solid #e2e6f0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

/* ── 404 / not found ─────────────────────────────────────── */

.not-found-card {
    text-align: center;
    padding: 56px 24px;
}

.not-found-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1f36;
    margin-bottom: 10px;
}

.not-found-body {
    color: #6b7280;
    margin-bottom: 24px;
}

.not-found-back {
    display: inline-block;
    color: #2563eb;
    font-size: 13px;
    text-decoration: none;
}

.not-found-back:hover {
    text-decoration: underline;
}

/* ── Company hero ────────────────────────────────────────── */

.hero-section {
    padding: 8px 24px 24px 24px;
    text-align: center;
}

.hero-section h1 {
    font-size: 2.6rem;
    font-weight: 800;
    color: #1a1f36;
    margin: 0;
}

.facts-list {
    max-width: 680px;
}

/* ── Facts card grid ─────────────────────────────────────── */

.company-page-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px 64px 48px;
    box-sizing: border-box;
}

.facts-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.fact-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border: 1px solid #e2e6f3;
    border-radius: 12px;
    padding: 20px 22px;
    flex: 1;
    min-width: 140px;
    transition: box-shadow 0.15s ease;
}

.fact-card:hover {
    box-shadow: 0 4px 12px rgba(26,31,54,0.08);
}

.fact-card--wide {
    flex: 2;
    min-width: 260px;
}

.fact-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.fact-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1f36;
    line-height: 1.4;
}

.fact-value--large {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1f36;
    line-height: 1.4;
    letter-spacing: 0;
}

.ticker-value {
    color: #1a1f36;
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 700;
}

.about-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.about-card p {
    font-size: 1.05rem;
    color: #374151;
    line-height: 1.75;
    margin: 0;
    text-align: justify;
}

.info-mono {
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 12.5px;
    font-weight: 600;
}

/* ── Info grid ───────────────────────────────────────────── */

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
}

@media (max-width: 800px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.info-col h3 {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e6f0;
}

.info-row {
    display: flex;
    gap: 10px;
    margin-bottom: 9px;
    font-size: 13.5px;
    align-items: flex-start;
}

.info-label {
    font-weight: 500;
    color: #6b7280;
    min-width: 130px;
    flex-shrink: 0;
    padding-top: 1px;
}

.info-value {
    color: #1a1a2e;
    line-height: 1.55;
}

.business-model-text {
    font-size: 13.5px;
    color: #374151;
    line-height: 1.7;
}

/* ── Pill badges ─────────────────────────────────────────── */

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1f36;
    margin-bottom: 14px;
}

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    display: inline-block;
    padding: 4px 13px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 500;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    white-space: nowrap;
}

.pill-alt {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ── Score cards ─────────────────────────────────────────── */

.score-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.score-card {
    background: #ffffff;
    border: 1px solid #e2e6f0;
    border-radius: 8px;
    padding: 24px;
}

.score-card h3 {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 16px;
}

.score-display {
    font-size: 40px;
    font-weight: 700;
    color: #1a1f36;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-bottom: 16px;
}

.score-denom {
    font-size: 18px;
    font-weight: 400;
    color: #9ba6c8;
}

.score-bar-track {
    background: #e5e7eb;
    border-radius: 6px;
    height: 10px;
    overflow: hidden;
}

.score-bar {
    height: 100%;
    border-radius: 6px;
}

.score-bar.green  { background: #22c55e; }
.score-bar.amber  { background: #f59e0b; }
.score-bar.red    { background: #ef4444; }

.score-pending {
    color: #9ca3af;
    font-size: 13px;
    margin-top: 8px;
    line-height: 1.6;
}

.score-pending code {
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    background: #f3f4f6;
    padding: 1px 6px;
    border-radius: 3px;
    color: #374151;
    font-size: 12px;
    font-style: normal;
}

/* ── Card title group ────────────────────────────────────── */

.card-title-group {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.card-title-group .card-title {
    margin-bottom: 0;
}

.card-subtitle {
    font-size: 12px;
    color: #9ba6c8;
}

/* ── Metrics toggle header ───────────────────────────────── */

.metrics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 4px 0 16px 0;
    user-select: none;
}

.metrics-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.section-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 3px 10px;
    letter-spacing: 0.02em;
    width: fit-content;
}

.metrics-toggle-btn {
    background: #EDCDD4;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #2d2d2d;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, transform 0.15s ease;
}

.metrics-toggle-btn:hover {
    background: #e0b8c2;
}

/* ── Metrics table ───────────────────────────────────────── */

.metrics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.metrics-table thead th {
    background: #f7f8fc;
    color: #6b7280;
    text-align: left;
    padding: 9px 14px;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e6f0;
    white-space: nowrap;
}

.metrics-table thead th.col-raw,
.metrics-table thead th.col-norm {
    text-align: right;
}

.metrics-table tbody tr:nth-child(odd) {
    background: #f7f8fc;
}

.metrics-table tbody tr:nth-child(even) {
    background: #ffffff;
}

.metrics-table tbody tr:hover {
    background: #eef0fa;
}

.metrics-table td {
    padding: 9px 14px;
    border-bottom: 1px solid #e8eaf2;
    color: #374151;
}

.metric-raw {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 13px;
    color: #4a5568;
}

.metric-norm {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 13px;
    font-weight: 600;
    color: #1a1f36;
}

/* ── Pending box ─────────────────────────────────────────── */

.pending-box {
    background: #fffbeb;
    border: 1px dashed #fcd34d;
    border-radius: 6px;
    padding: 22px 24px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.pending-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1.5;
}

.pending-box p {
    font-size: 13.5px;
    color: #78716c;
    line-height: 1.6;
    margin: 0;
}

.pending-box code {
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    background: #fef3c7;
    padding: 1px 6px;
    border-radius: 3px;
    color: #92400e;
    font-size: 12px;
}

/* ── Glassdoor card ──────────────────────────────────────── */

.glassdoor-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-top: 4px;
    margin-bottom: 16px;
}

.glassdoor-grid-7 {
    grid-template-columns: repeat(4, 1fr);
}

.gd-item {
    background: #f7f8fc;
    border: 1px solid #e2e6f0;
    border-radius: 6px;
    padding: 14px 16px;
    text-align: center;
}

.gd-label {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    color: #9ba6c8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.gd-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #1a1f36;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.gd-item-date .gd-value,
.gd-date {
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
}

.gd-note {
    font-size: 12px;
    color: #9ba6c8;
    border-top: 1px solid #e8eaf2;
    padding-top: 12px;
    margin: 0;
    line-height: 1.6;
}


.gd-note code {
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    background: #f3f4f6;
    padding: 1px 6px;
    border-radius: 3px;
    color: #374151;
    font-size: 11px;
}

/* ── News grid ───────────────────────────────────────────── */

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

.news-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.news-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: #a0aec0;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.news-source {
    font-size: 0.72rem;
    font-weight: 600;
    color: #4a6fa5;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-date {
    font-size: 0.72rem;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}

.news-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.4;
    margin-bottom: 8px;
}

.news-read-more {
    margin-top: 10px;
    font-size: 0.78rem;
    color: #4a6fa5;
    font-weight: 500;
}

.news-card:hover .news-read-more {
    text-decoration: underline;
}

.news-footer-note {
    margin-top: 14px;
    font-size: 0.78rem;
    color: #9ca3af;
    text-align: right;
}

.muted {
    color: #9ca3af;
    font-size: 0.82rem;
    margin-top: 4px;
}

/* ── Navbar ──────────────────────────────────────────────── */

.navbar {
    background: #EDCDD4;
    height: 56px;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: none;
    margin: 0;
}

.nav-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 0 32px;
    box-sizing: border-box;
}

.nav-brand {
    color: #1a1a1a;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    margin-right: auto;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-links a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    transition: color 0.15s ease;
}

.nav-links a:hover {
    color: #000000;
}

.nav-links a.nav-active {
    color: #000000;
    border-bottom: 2px solid #000000;
    padding-bottom: 2px;
}

/* ── Site footer ─────────────────────────────────────────── */

.site-footer {
    background: #000000;
    color: #555555;
    border-top: 1px solid #1a1a1a;
    text-align: center;
    padding: 32px;
    font-size: 0.78rem;
}

/* ── Placeholder pages ───────────────────────────────────── */

.placeholder-page {
    width: 100%;
    min-height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 64px 32px;
    box-sizing: border-box;
    background: #ffffff;
}

.placeholder-page h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1f36;
    margin-bottom: 20px;
}

.placeholder-note {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 600px;
}

/* ── About page ──────────────────────────────────────────── */

.about-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 32px 64px 32px;
}

.about-hero {
    padding: 48px 0 32px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 40px;
}

.about-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1a1f36;
    margin: 0;
}

.about-section {
    margin-bottom: 48px;
}

.about-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1f36;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.about-section p {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.75;
    margin-bottom: 14px;
    text-align: justify;
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-list li {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.7;
    padding-left: 16px;
    border-left: 3px solid #1a1f36;
    text-align: justify;
}

.about-section--muted h2 {
    color: #9ca3af;
    border-bottom-color: #f3f4f6;
}

/* ── Purpose page ────────────────────────────────────────── */

.purpose-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 32px 64px 32px;
}

.purpose-section {
    margin-bottom: 52px;
}

.purpose-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1f36;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.purpose-section p {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.75;
    margin-bottom: 14px;
}

.personal-grid {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 32px;
    align-items: stretch;
    margin-top: 8px;
}

.personal-text {
    display: flex;
    flex-direction: column;
}

.personal-text p {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.75;
    margin-bottom: 14px;
}

.personal-photo {
    display: flex;
}

.personal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

/* ══════════════════════════════
   HOME PAGE — clean rebuild
══════════════════════════════ */

.hp-wrap {
    width: 100%;
    background: #000000;
    min-height: 100vh;
    box-sizing: border-box;
    padding-top: 0;
    margin-top: 0;
}

.hp-top {
  display: grid;
  grid-template-columns: 55% 45%;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
}

.hp-left {
    padding: 38px 20px 20px 56px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.hp-logo {
    font-size: clamp(3.5rem, 9.5vw, 10.5rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 0.95;
    margin-bottom: 20px;
    margin-top: 0;
}

.hp-sub {
    font-size: clamp(0.65rem, 1.2vw, 1.1rem);
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0;
    margin-top: 16px;
}

.hp-tag {
    font-size: clamp(0.75rem, 1vw, 0.95rem);
    color: rgba(255,255,255,0.78);
    line-height: 1.7;
    max-width: 100%;
    margin-top: 25px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hp-right {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    padding-top: 16px;
}

.hp-img {
  width: 52%;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  display: block;
}

.three-bs-outer {
    width: 100%;
    box-sizing: border-box;
    padding: 0px 56px 40px 56px;
}

/* Divider with star */
.hp-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-top: 8px;
}

.hp-divider-line {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.15);
}

.hp-divider-star {
    color: rgba(255,255,255,0.4);
    font-size: 1rem;
}

.hp-bs-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    text-align: center;
    margin: 0 0 28px 0;
}

.hp-bs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.hp-card {
    border-radius: 12px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: box-shadow 0.15s ease;
    box-sizing: border-box;
}

/* Brands — subtle green */
.hp-card:nth-child(1) {
    background: rgba(80, 200, 120, 0.08);
    border: 1px solid rgba(80, 200, 120, 0.20);
}
.hp-card:nth-child(1) .hp-card-title { color: #6dd49a; }
.hp-card:nth-child(1) .hp-card-link  { color: #6dd49a; }

/* Behaviour — subtle pink */
.hp-card:nth-child(2) {
    background: rgba(255, 179, 198, 0.08);
    border: 1px solid rgba(255, 179, 198, 0.20);
}
.hp-card:nth-child(2) .hp-card-title { color: #FFB3C6; }
.hp-card:nth-child(2) .hp-card-link  { color: #FFB3C6; }

/* Business — subtle blue */
.hp-card:nth-child(3) {
    background: rgba(135, 206, 235, 0.08);
    border: 1px solid rgba(135, 206, 235, 0.20);
}
.hp-card:nth-child(3) .hp-card-title { color: #87CEEB; }
.hp-card:nth-child(3) .hp-card-link  { color: #87CEEB; }

/* Hover for all */
.hp-card:hover {
    box-shadow: 0 4px 20px rgba(255,255,255,0.06);
    filter: brightness(1.1);
}

/* Card header: icon + title side by side */
.hp-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

/* Icon circle */
.hp-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hp-icon-green {
    background: rgba(80, 200, 120, 0.15);
    border: 1px solid rgba(80, 200, 120, 0.30);
    color: #6dd49a;
}

.hp-icon-pink {
    background: rgba(255, 179, 198, 0.15);
    border: 1px solid rgba(255, 179, 198, 0.30);
    color: #FFB3C6;
}

.hp-icon-blue {
    background: rgba(135, 206, 235, 0.15);
    border: 1px solid rgba(135, 206, 235, 0.30);
    color: #87CEEB;
}

.hp-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hp-card-desc {
    font-size: 0.92rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    flex-grow: 1;
}

.hp-card-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: #EDCDD4;
  text-decoration: none;
  margin-top: 4px;
}

.hp-card-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ── Visualise page ── */

.vis-page {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 24px 32px 48px 32px;
    box-sizing: border-box;
}

.vis-dark-wrap {
    background: #000000;
    min-height: calc(100vh - 56px);
    width: 100%;
}

.vis-dark-wrap .vis-title {
    color: #ffffff;
}

.vis-dark-wrap .vis-subtitle {
    color: rgba(255,255,255,0.55);
}

.vis-dark-wrap .vis-quad-card-desc {
    color: rgba(255,255,255,0.75);
}

.vis-header {
    margin-bottom: 24px;
    text-align: center;
}

.vis-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.vis-subtitle {
    font-size: 1.0rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.vis-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #fde68a;
}

/* Chart full width */
.vis-chart-wrap {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

#bubble-chart {
    width: 100%;
    height: 580px;
}

/* Horizontal guide row */
.vis-guide-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

/* Quadrant cards */
.vis-quad-card {
    border-radius: 10px;
    padding: 14px 16px;
    border-left: 3px solid transparent;
}

.vis-quad-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.vis-quad-card-desc {
    font-size: 0.78rem;
    line-height: 1.6;
    color: #4b5563;
    text-align: justify;
}

.vis-quad-ss {
    background: rgba(74,179,120,0.18);
    border-left: 4px solid #4ab378;
    border-top: 1px solid rgba(74,179,120,0.3);
    border-right: 1px solid rgba(74,179,120,0.3);
    border-bottom: 1px solid rgba(74,179,120,0.3);
}
.vis-quad-ss .vis-quad-card-title { color: #6dd4a0; }
.vis-quad-ss .vis-quad-card-desc { color: rgba(255,255,255,0.75); }

.vis-quad-ws {
    background: rgba(100,160,220,0.18);
    border-left: 4px solid #5ea0d8;
    border-top: 1px solid rgba(100,160,220,0.3);
    border-right: 1px solid rgba(100,160,220,0.3);
    border-bottom: 1px solid rgba(100,160,220,0.3);
}
.vis-quad-ws .vis-quad-card-title { color: #7ab8e8; }
.vis-quad-ws .vis-quad-card-desc { color: rgba(255,255,255,0.75); }

.vis-quad-sw {
    background: rgba(255,160,80,0.18);
    border-left: 4px solid #f4a04a;
    border-top: 1px solid rgba(255,160,80,0.3);
    border-right: 1px solid rgba(255,160,80,0.3);
    border-bottom: 1px solid rgba(255,160,80,0.3);
}
.vis-quad-sw .vis-quad-card-title { color: #f4b870; }
.vis-quad-sw .vis-quad-card-desc { color: rgba(255,255,255,0.75); }

.vis-quad-ww {
    background: rgba(220,80,80,0.18);
    border-left: 4px solid #dc5050;
    border-top: 1px solid rgba(220,80,80,0.3);
    border-right: 1px solid rgba(220,80,80,0.3);
    border-bottom: 1px solid rgba(220,80,80,0.3);
}
.vis-quad-ww .vis-quad-card-title { color: #e87878; }
.vis-quad-ww .vis-quad-card-desc { color: rgba(255,255,255,0.75); }

/* Responsive: 2 columns on smaller screens */
@media (max-width: 900px) {
    .vis-guide-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 540px) {
    .vis-guide-row {
        grid-template-columns: 1fr;
    }
}

/* ── Quick View Panel ── */

.qv-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 200;
}

.qv-overlay.qv-open {
    display: block;
}

.qv-panel {
    position: fixed;
    top: 56px;
    right: -420px;
    width: 400px;
    height: calc(100vh - 56px);
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    z-index: 201;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-sizing: border-box;
}

.qv-panel.qv-open {
    right: 0;
}

.qv-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.qv-close:hover {
    background: #f3f4f6;
    color: #1a1f36;
}

.qv-content {
    padding: 40px 28px 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    box-sizing: border-box;
}

.qv-ticker-badge {
    display: inline-block;
    background: #f0f4ff;
    color: #4a6fa5;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: monospace;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: 0.05em;
    width: fit-content;
}

.qv-name {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1a1f36;
    margin: 0;
    line-height: 1.1;
}

.qv-sector {
    font-size: 1.0rem;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.qv-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 8px 0;
}

.qv-score-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 12px;
}

.qv-score-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.qv-score-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1f36;
}

.qv-desc {
    font-size: 0.88rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
    text-align: justify;
}

.qv-stock {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 4px;
}

.qv-stock-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.qv-stock-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.qv-stock-note {
    font-size: 0.65rem;
    color: #9ca3af;
}

.qv-stock-body {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.qv-stock-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1f36;
}

.qv-stock-change {
    font-size: 0.82rem;
    font-weight: 600;
}

.qv-explore-btn {
    display: block;
    background: #1a1f36;
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    padding: 18px 20px;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: auto;
    transition: background 0.15s ease;
}

.qv-explore-btn:hover {
    background: #2d3561;
}

/* Quadrant label */
.qv-quadrant {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    width: fit-content;
}

.qv-q-ss { background: rgba(74,179,120,0.12);  color: #2d7a52; }
.qv-q-sw { background: rgba(255,160,80,0.12);   color: #9a5a10; }
.qv-q-ws { background: rgba(100,160,220,0.12);  color: #2a5a8a; }
.qv-q-ww { background: rgba(220,80,80,0.12);    color: #8a2a2a; }

/* Company facts row */
.qv-facts {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr 1fr;
    gap: 10px;
}

.qv-fact {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
}

.qv-fact-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.qv-fact-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1f36;
    line-height: 1.3;
}

/* Brands section */
.qv-brands-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qv-brands-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.qv-brands-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.qv-brand-pill {
    background: #f0f4ff;
    color: #4a6fa5;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid #dbeafe;
}

/* ── Financial Breakdown Page ── */
.fb-page {
    padding-top: 48px;
}

.fb-hero {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e5e7eb;
}

.fb-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1f36;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.fb-intro {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.75;
    margin: 0;
    max-width: 720px;
    text-align: justify;
}

/* Four bucket nav cards */
.fb-buckets {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 48px;
}

.fb-bucket-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    gap: 8px;
    cursor: pointer;
}

.fb-bucket-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}

.fb-bucket-icon {
    font-size: 1.4rem;
    font-weight: 700;
}

.fb-bucket-label {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.fb-bucket-weight {
    font-size: 1.4rem;
    font-weight: 800;
}

/* Bucket colours */
.fb-bucket-growth  { background: rgba(74,179,120,0.10); border: 1.5px solid rgba(74,179,120,0.30); color: #2d7a52; }
.fb-bucket-profit  { background: rgba(59,130,246,0.08); border: 1.5px solid rgba(59,130,246,0.25); color: #1d4ed8; }
.fb-bucket-health  { background: rgba(236,72,153,0.08); border: 1.5px solid rgba(236,72,153,0.25); color: #be185d; }
.fb-bucket-returns { background: rgba(139,92,246,0.08); border: 1.5px solid rgba(139,92,246,0.25); color: #6d28d9; }

/* Bucket section anchor tag */
.fb-bucket-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.fb-tag-growth  { background: rgba(74,179,120,0.12);  color: #2d7a52; }
.fb-tag-profit  { background: rgba(59,130,246,0.10);  color: #1d4ed8; }
.fb-tag-health  { background: rgba(236,72,153,0.10);  color: #be185d; }
.fb-tag-returns { background: rgba(139,92,246,0.10);  color: #6d28d9; }

/* Metric blocks within sections */
.fb-metric-block {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #1a1f36;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.fb-metric-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1f36;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fb-metric-w {
    font-size: 0.75rem;
    font-weight: 600;
    background: #1a1f36;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 10px;
}

.fb-metric-block p {
    font-size: 0.88rem;
    color: #4b5563;
    line-height: 1.65;
    margin: 0;
}

/* Weights table layout */
.fb-weights-layout {
    display: block;
    margin-top: 24px;
}

/* Weights table */
.fb-weights-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.fb-weights-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

.fb-weights-table td {
    padding: 10px 14px;
    color: #1a1f36;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.88rem;
}

.fb-weights-table tr:last-child td {
    border-bottom: none;
}

.fb-weights-table td:last-child {
    font-weight: 700;
    color: #1a1f36;
}

/* Bucket badges in table */
.fb-badge {
    font-size: 0.70rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

.fb-badge-growth  { background: rgba(74,179,120,0.12);  color: #2d7a52; }
.fb-badge-profit  { background: rgba(59,130,246,0.10);  color: #1d4ed8; }
.fb-badge-health  { background: rgba(236,72,153,0.10);  color: #be185d; }
.fb-badge-returns { background: rgba(139,92,246,0.10);  color: #6d28d9; }

/* Bar chart */
.fb-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 8px;
}

.fb-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fb-bar-label {
    font-size: 0.78rem;
    color: #6b7280;
    width: 140px;
    flex-shrink: 0;
    text-align: right;
}

.fb-bar {
    height: 10px;
    border-radius: 5px;
    flex-shrink: 0;
    max-width: 200px;
}

.fb-bar-growth  { background: #4ab378; }
.fb-bar-profit  { background: #3b82f6; }
.fb-bar-health  { background: #ec4899; }
.fb-bar-returns { background: #8b5cf6; }

.fb-bar-pct {
    font-size: 0.78rem;
    font-weight: 700;
    color: #1a1f36;
    width: 32px;
}

/* Normalised score bar */
.norm-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.norm-bar {
    height: 8px;
    background: #1a1f36;
    border-radius: 4px;
    min-width: 2px;
    max-width: 120px;
}

.norm-val {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1a1f36;
    white-space: nowrap;
}

/* Metric quirk note */
.metric-note-cell {
    font-size: 0.78rem;
}

.metric-quirk {
    color: #6b7280;
    font-size: 0.75rem;
    font-style: italic;
}

.metric-quirk a {
    color: #4a6fa5;
    text-decoration: none;
}

.metric-quirk a:hover {
    text-decoration: underline;
}

.metric-proxy-note {
    display: block;
    color: #9c7a2a;
    font-size: 0.73rem;
    font-style: italic;
    margin-top: 3px;
}

/* Interest coverage analytical note on company pages */
.fin-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #f0f4ff;
    border: 1px solid #dbeafe;
    border-left: 3px solid #4a6fa5;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 16px;
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.65;
}

.fin-note-icon {
    font-size: 1rem;
    color: #4a6fa5;
    flex-shrink: 0;
    margin-top: 1px;
}

.fin-note a {
    color: #4a6fa5;
    font-weight: 600;
    text-decoration: none;
}

.fin-note a:hover {
    text-decoration: underline;
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* Responsive */
@media (max-width: 900px) {
    .fb-buckets { grid-template-columns: 1fr 1fr; }
    .fb-weights-layout { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
    .fb-buckets { grid-template-columns: 1fr; }
}

/* ── Company fact pills ──────────────────────────────────── */

.facts-pills-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
}

.fact-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 5px;
    background: #fdf4f6;
    border: 1px solid #f0d6dc;
    border-radius: 999px;
    padding: 14px 24px;
    flex: 1;
    transition: box-shadow 0.15s ease, background 0.15s ease;
}

.fact-pill:hover {
    background: #faeaed;
    box-shadow: 0 2px 8px rgba(237, 205, 212, 0.4);
}

.fact-pill--wide {
    border-radius: 20px;
    flex: 2;
    align-items: flex-start;
    text-align: left;
}

.fact-pill-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #c08090;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.fact-pill-value {
    font-size: 1.0rem;
    font-weight: 700;
    color: #1a1f36;
    line-height: 1.3;
}

.metric-row-muted td {
    opacity: 0.45;
    font-style: italic;
}

.metrics-table td:first-child,
.metrics-table th:first-child {
    white-space: nowrap;
    min-width: 220px;
}

/* Quadrant chips — companies scoreboard */
.chip.dual-strength {
    background: rgba(109, 212, 160, 0.15);
    color: #2d8a5e;
    border: 1px solid rgba(109, 212, 160, 0.4);
}

.chip.financial-leader {
    background: rgba(244, 184, 112, 0.15);
    color: #a06b1a;
    border: 1px solid rgba(244, 184, 112, 0.4);
}

.chip.hidden-momentum {
    background: rgba(122, 184, 232, 0.15);
    color: #1a5f8a;
    border: 1px solid rgba(122, 184, 232, 0.4);
}

.chip.under-pressure {
    background: rgba(232, 120, 120, 0.15);
    color: #8a2020;
    border: 1px solid rgba(232, 120, 120, 0.4);
}

/* Guide row on white background (scoreboard page) */
.scoreboard-guide-row {
    margin-top: 32px;
}

.scoreboard-guide-row .vis-quad-card-title {
    color: #1a1f36;
}

.scoreboard-guide-row .vis-quad-card-desc {
    color: #4a5568;
}

.scoreboard-guide-row .vis-quad-ss {
    background: rgba(109, 212, 160, 0.08);
    border: 1px solid rgba(109, 212, 160, 0.3);
}

.scoreboard-guide-row .vis-quad-ss .vis-quad-card-title { color: #2d8a5e; }

.scoreboard-guide-row .vis-quad-ws {
    background: rgba(122, 184, 232, 0.08);
    border: 1px solid rgba(122, 184, 232, 0.3);
}

.scoreboard-guide-row .vis-quad-ws .vis-quad-card-title { color: #1a5f8a; }

.scoreboard-guide-row .vis-quad-sw {
    background: rgba(244, 184, 112, 0.08);
    border: 1px solid rgba(244, 184, 112, 0.3);
}

.scoreboard-guide-row .vis-quad-sw .vis-quad-card-title { color: #a06b1a; }

.scoreboard-guide-row .vis-quad-ww {
    background: rgba(232, 120, 120, 0.08);
    border: 1px solid rgba(232, 120, 120, 0.3);
}

.scoreboard-guide-row .vis-quad-ww .vis-quad-card-title { color: #8a2020; }

/* ── Behavioural Breakdown page ─────────────────────────────── */

.bb-bucket-consumer { background: rgba(239,68,68,0.08);   border: 1.5px solid rgba(239,68,68,0.25);   color: #dc2626; }
.bb-bucket-employee { background: rgba(249,115,22,0.08);  border: 1.5px solid rgba(249,115,22,0.25);  color: #c2410c; }
.bb-bucket-momentum { background: rgba(234,179,8,0.08);   border: 1.5px solid rgba(234,179,8,0.25);   color: #a16207; }

.bb-tag-consumer { background: rgba(239,68,68,0.10);  color: #dc2626; }
.bb-tag-employee { background: rgba(249,115,22,0.10); color: #c2410c; }
.bb-tag-momentum { background: rgba(234,179,8,0.10);  color: #a16207; }

.bb-badge-consumer { background: rgba(239,68,68,0.10);  color: #dc2626; }
.bb-badge-employee { background: rgba(249,115,22,0.10); color: #c2410c; }
.bb-badge-momentum { background: rgba(234,179,8,0.10);  color: #a16207; }

.fb-metric-block p + p {
    margin-top: 1em;
}

/* ── Behavioural breakdown geography cards ───────────────────── */

.bb-geo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
    width: 100%;
}

.bb-geo-card {
    border-radius: 12px;
    padding: 20px;
}

.bb-geo-us {
    background: rgba(239,68,68,0.06);
    border: 1.5px solid rgba(239,68,68,0.20);
}

.bb-geo-global {
    background: rgba(234,179,8,0.06);
    border: 1.5px solid rgba(234,179,8,0.25);
}

.bb-geo-mixed {
    background: rgba(249,115,22,0.06);
    border: 1.5px solid rgba(249,115,22,0.20);
}

.bb-geo-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1f36;
    margin-bottom: 4px;
}

.bb-geo-card-weights {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 14px;
    font-weight: 500;
}

.bb-geo-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bb-geo-pill {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #374151;
}

/* ── Trustpilot confidence modifier bubble ───────────────────── */
.bb-confidence-bubble {
    background: linear-gradient(135deg, rgba(180,120,80,0.08) 0%, rgba(150,90,50,0.08) 100%);
    border: 1.5px solid rgba(180,120,80,0.30);
    border-radius: 16px;
    padding: 20px 24px;
    margin: 24px 0;
}

.bb-confidence-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bb-confidence-bubble p {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.7;
    margin: 0;
    text-align: justify;
}

/* ── Home page visualise button ─────────────────────────────── */
.hp-visualise-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 7px 16px;
    background: #EDCDD4;
    color: #1a1f36;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 999px;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.15s ease, transform 0.15s ease;
    width: fit-content;
}

.hp-visualise-btn:hover {
    background: #e0b8c1;
    transform: translateX(3px);
}

/* ── Companies page dark background — white card ─────────── */
.companies-dark-wrap {
    background: #0a0a0f;
    min-height: 100vh;
    padding: 28px 32px;
}

.companies-dark-wrap h2 {
    color: #ffffff;
}

.companies-dark-wrap .scoreboard-section {
    background: #ffffff;
    border: 1px solid #e2e6f0;
}

/* Quadrant chips readable on dark background outside the card */
.companies-dark-wrap .section-header {
    background: transparent;
}

/* Guide cards on dark background — black body text, solid coloured titles */
.companies-dark-wrap .scoreboard-guide-row .vis-quad-card-title {
    color: inherit;
}

.companies-dark-wrap .scoreboard-guide-row .vis-quad-card-desc {
    color: #1a1f36;
}

.companies-dark-wrap .scoreboard-guide-row .vis-quad-ss {
    background: rgba(74,179,120,0.12);
    border-color: rgba(74,179,120,0.30);
}

.companies-dark-wrap .scoreboard-guide-row .vis-quad-ss .vis-quad-card-title {
    color: #2d7a52;
}

.companies-dark-wrap .scoreboard-guide-row .vis-quad-ws {
    background: rgba(100,160,220,0.12);
    border-color: rgba(100,160,220,0.30);
}

.companies-dark-wrap .scoreboard-guide-row .vis-quad-ws .vis-quad-card-title {
    color: #1a5f8a;
}

.companies-dark-wrap .scoreboard-guide-row .vis-quad-sw {
    background: rgba(255,160,80,0.12);
    border-color: rgba(255,160,80,0.30);
}

.companies-dark-wrap .scoreboard-guide-row .vis-quad-sw .vis-quad-card-title {
    color: #a06b1a;
}

.companies-dark-wrap .scoreboard-guide-row .vis-quad-ww {
    background: rgba(220,80,80,0.12);
    border-color: rgba(220,80,80,0.30);
}

.companies-dark-wrap .scoreboard-guide-row .vis-quad-ww .vis-quad-card-title {
    color: #8a2020;
}

.companies-dark-wrap .page-footer {
    color: #9ba6c8;
    border-top-color: #2a2a3a;
}

.companies-dark-wrap .page-footer strong {
    color: #e2e8f0;
}

/* ── BrandSignals Chat Assistant ─────────────────────────────── */

.nav-chat-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.30);
    color: #1a1f36;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.nav-chat-btn:hover {
    background: rgba(255,255,255,0.30);
}

.nav-chat-btn--active {
    background: #1a1f36;
    color: #EDCDD4;
    border-color: #1a1f36;
}

.bs-chat-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    background: #1a1f36;
    border-left: 1px solid #2d3561;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: -4px 0 24px rgba(0,0,0,0.3);
}

.bs-chat-panel.bs-chat-open {
    transform: translateX(0);
}

.bs-chat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #2d3561;
    flex-shrink: 0;
}

.bs-chat-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bs-chat-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #EDCDD4;
    letter-spacing: 0.02em;
}

.bs-chat-subtitle {
    font-size: 0.72rem;
    color: #9ba6c8;
}

.bs-chat-close {
    background: none;
    border: none;
    color: #9ba6c8;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.bs-chat-close:hover {
    color: #ffffff;
}

.bs-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bs-msg {
    max-width: 90%;
    border-radius: 12px;
    padding: 10px 14px;
}

.bs-msg p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

.bs-msg-user {
    background: #EDCDD4;
    color: #1a1f36;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.bs-msg-user p {
    color: #1a1f36;
}

.bs-msg-assistant {
    background: #252d4a;
    color: #e2e8f0;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.bs-msg-assistant p {
    color: #e2e8f0;
}

.bs-chat-input-row {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    border-top: 1px solid #2d3561;
    flex-shrink: 0;
}

.bs-chat-input {
    flex: 1;
    background: #252d4a;
    border: 1px solid #2d3561;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.82rem;
    color: #e2e8f0;
    font-family: inherit;
    outline: none;
}

.bs-chat-input::placeholder {
    color: #6b7a99;
}

.bs-chat-input:focus {
    border-color: #EDCDD4;
}

.bs-chat-send {
    background: #EDCDD4;
    border: none;
    border-radius: 999px;
    width: 36px;
    height: 36px;
    font-size: 1rem;
    color: #1a1f36;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.bs-chat-send:hover {
    background: #e0b8c1;
}

/* ── About page — Data Source Cards ─────────────────────── */
.ds-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.ds-card {
    border-radius: 12px;
    padding: 20px 24px;
    border-left: 4px solid transparent;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-left-width: 4px;
}

.ds-card--platform {
    border-left-color: #2dd4bf;
    background: rgba(45,212,191,0.04);
}

.ds-card--financial {
    border-left-color: #ec4899;
    background: rgba(236,72,153,0.04);
}

.ds-card--behavioural {
    border-left-color: #a855f7;
    background: rgba(168,85,247,0.04);
}

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

.ds-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1f36;
}

.ds-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ds-badge--platform {
    background: rgba(45,212,191,0.12);
    color: #0d9488;
    border: 1px solid rgba(45,212,191,0.30);
}

.ds-badge--financial {
    background: rgba(236,72,153,0.10);
    color: #be185d;
    border: 1px solid rgba(236,72,153,0.25);
}

.ds-badge--behavioural {
    background: rgba(168,85,247,0.10);
    color: #7c3aed;
    border: 1px solid rgba(168,85,247,0.25);
}

.ds-card-body {
    font-size: 0.88rem;
    color: #4b5563;
    line-height: 1.7;
    margin: 0;
    text-align: justify;
}

.ds-link {
    color: #7c3aed;
    text-decoration: underline;
}

.ds-link:hover {
    color: #6d28d9;
}

/* ── Ethics page ─────────────────────────────────────────── */

.ethics-link {
    color: #be185d;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.15s ease;
}

.ethics-link:hover {
    color: #9d174d;
}

.ethics-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 8px;
}

.ethics-pillar {
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    border: 1px solid transparent;
}

.ethics-pillar--pink {
    background: rgba(236,72,153,0.07);
    border-color: rgba(236,72,153,0.25);
}

.ethics-pillar--pink .ethics-pillar-label { color: #be185d; }

.ethics-pillar--green {
    background: rgba(34,197,94,0.07);
    border-color: rgba(34,197,94,0.25);
}

.ethics-pillar--green .ethics-pillar-label { color: #15803d; }

.ethics-pillar--purple {
    background: rgba(168,85,247,0.07);
    border-color: rgba(168,85,247,0.25);
}

.ethics-pillar--purple .ethics-pillar-label { color: #7c3aed; }

.ethics-pillar-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
    color: #374151;
}

.ethics-pillar-label {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.ethics-pillar-desc {
    font-size: 0.82rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
    text-align: center !important;
}

.ethics-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(236,72,153,0.04);
    border: 1px solid rgba(236,72,153,0.20);
    border-left: 4px solid #ec4899;
    border-radius: 12px;
    padding: 24px;
}

.ethics-disclaimer-icon {
    font-size: 1.4rem;
    color: #be185d;
    flex-shrink: 0;
    margin-top: 2px;
}

.ethics-disclaimer h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.ethics-disclaimer p {
    margin-bottom: 6px;
}

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

/* ── Ethics intro statement ──────────────────────────────── */
.ethics-intro-statement {
    font-size: 1.25rem;
    font-weight: 700;
    color: #be185d;
    line-height: 1.6;
    margin: 0;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── Company page — About + Stock Price row ──────────────── */
.about-stock-row {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 16px;
    margin-bottom: 20px;
    align-items: stretch;
}

.about-card--narrow {
    margin-bottom: 0;
    width: auto;
    display: flex;
    align-items: center;
}

.about-card--narrow p {
    margin: 0;
    text-align: justify;
}

.stock-price-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 180px;
}

.stock-price-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stock-price-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1f36;
    line-height: 1.2;
    margin-top: 4px;
}

.stock-price-change {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.stock-price-ticker {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 600;
    margin-bottom: 8px;
}

.stock-price-note {
    font-size: 0.70rem;
    color: #9ca3af;
    line-height: 1.5;
    margin: 0;
    margin-top: auto;
    text-align: left !important;
}

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

/* ── Financial metric definitions ────────────────────────── */
.metric-def {
    display: block;
    font-size: 0.72rem;
    color: #9ca3af;
    margin-top: 3px;
    line-height: 1.4;
}

/* ── Valuation multiples ─────────────────────────────────── */
.valuation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.val-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
}

.val-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.val-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1f36;
    margin-bottom: 4px;
}

.val-desc {
    font-size: 0.70rem;
    color: #9ca3af;
    line-height: 1.4;
}

/* ── Market Sentiment ────────────────────────────────────── */
.sentiment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.sent-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
}

.sent-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.sent-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1f36;
    margin-bottom: 8px;
}

.sent-bar-wrap {
    background: #e5e7eb;
    border-radius: 999px;
    height: 4px;
    width: 100%;
    margin-bottom: 4px;
    overflow: hidden;
}

.sent-bar {
    height: 4px;
    border-radius: 999px;
    width: 0%;
    transition: width 0.4s ease;
}

.sent-range {
    font-size: 0.68rem;
    color: #9ca3af;
    margin-top: 4px;
}

.sent-desc {
    font-size: 0.70rem;
    color: #9ca3af;
    line-height: 1.4;
    margin-top: 4px;
}

.sent-peer {
    font-size: 0.72rem;
    font-weight: 700;
    margin-top: 2px;
    letter-spacing: 0.03em;
    display: block;
}

/* ── Insights page ───────────────────────────────────────── */
.insights-leaderboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.insights-lb-card {
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
}

.insights-lb-top {
    background: rgba(22,163,74,0.04);
    border-color: rgba(22,163,74,0.20);
}

.insights-lb-bottom {
    background: rgba(220,38,38,0.04);
    border-color: rgba(220,38,38,0.20);
}

.insights-lb-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 12px;
}

.insights-lb-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.insights-lb-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1a1f36;
}

.insights-lb-val {
    font-size: 0.9rem;
    font-weight: 700;
}

.insights-lb-loading {
    font-size: 0.82rem;
    color: #9ca3af;
    padding: 8px 0;
}

/* ── Insights section colours ────────────────────────────── */
.insights-section-valuation {
    border-left: 4px solid #ec4899;
    padding-left: 24px;
}

.insights-section-valuation h2 {
    color: #be185d;
}

.insights-section-sentiment {
    border-left: 4px solid #3b82f6;
    padding-left: 24px;
}

.insights-section-sentiment h2 {
    color: #1d4ed8;
}

.insights-section-scores {
    border-left: 4px solid #8b5cf6;
    padding-left: 24px;
}

.insights-section-scores h2 {
    color: #6d28d9;
}

.insights-section-limits {
    border-left: 4px solid #9ca3af;
    padding-left: 24px;
}

.insights-section-limits h2 {
    color: #4b5563;
}

/* ── Insights section metric name colours ────────────────── */
.insights-section-valuation .fb-metric-name {
    color: #be185d !important;
}

.insights-section-sentiment .fb-metric-name {
    color: #1d4ed8 !important;
}

.insights-section-scores .fb-metric-name {
    color: #6d28d9 !important;
}

.insights-section-limits .fb-metric-name {
    color: #4b5563 !important;
}

/* ── Uppercase section titles ────────────────────────────── */
.fb-page .about-section h2,
.fb-page .fb-bucket-section h2 {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.qv-brands-note {
    font-size: 0.65rem;
    color: #9ca3af;
    margin-top: 6px;
    margin-bottom: 0;
    font-style: italic;
}

/* ── Holding company note ────────────────────────────────── */
.holding-company-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(99,102,241,0.05);
    border: 1px solid rgba(99,102,241,0.20);
    border-left: 4px solid #6366f1;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.6;
}

.holding-company-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}
