/* Company profile — shared styles
   Source of truth for /companies/{slug}/index.html pages generated from
   companies/data/{slug}.json by scripts/build-companies.mjs. */

:root {
    --navy: #141B2D;
    --navy-light: #1E2A45;
    --navy-lighter: #2A3A5A;
    --blue: #3B82F6;
    --blue-hover: #2563EB;
    --teal: #10B981;
    --purple: #8B5CF6;
    --amber: #F59E0B;
    --orange: #F2A55E;
    --orange-accent: #F7A340;
    --white: #FFFFFF;
    --text-light: rgba(255, 255, 255, 0.7);
    --text-lighter: rgba(255, 255, 255, 0.5);
    --text-faint: rgba(255, 255, 255, 0.35);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-mid: rgba(255, 255, 255, 0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--navy);
    color: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

/* Top nav (matches global Dealroom landing pages) */
nav.site-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 0 2rem;
    background: rgba(20, 27, 45, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}
.nav-inner {
    max-width: 1280px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    height: 70px;
}
.logo img { height: 28px; display: block; }
.nav-center { display: flex; gap: 2rem; }
.nav-link { color: var(--text-light); text-decoration: none; font-size: 0.9375rem; font-weight: 500; transition: color 0.15s ease; }
.nav-link:hover, .nav-link.active { color: var(--white); }
.nav-right { display: flex; gap: 0.75rem; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.625rem 1.25rem; border-radius: 8px; font-family: inherit; font-size: 0.9375rem; font-weight: 500; text-decoration: none; cursor: pointer; transition: all 0.15s ease; border: 1px solid transparent; white-space: nowrap; }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--border-mid); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.35); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-hover); }
.btn-outline { background: transparent; color: var(--white); border: 1px solid var(--border-mid); padding: 0.5rem 0.95rem; font-size: 0.875rem; }
.btn-outline:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.35); }
.btn-lg { padding: 0.85rem 1.6rem; font-size: 1rem; }
.btn .short-text { display: none; }
@media (max-width: 1000px) { .nav-center { display: none; } }
@media (max-width: 640px) { .btn .full-text { display: none; } .btn .short-text { display: inline; } }

main { padding-top: 70px; }

/* Hero */
.hero {
    position: relative;
    padding: 4rem 2rem 2rem;
    background: radial-gradient(ellipse at 50% 0%, rgba(59,130,246,0.18) 0%, rgba(20,27,45,0) 60%), var(--navy);
    overflow: hidden;
}
.hero-inner { max-width: 1140px; margin: 0 auto; }
.hero-breadcrumb { font-size: 0.8125rem; color: var(--text-lighter); margin-bottom: 1.5rem; }
.hero-breadcrumb a { color: var(--text-light); text-decoration: none; }
.hero-breadcrumb a:hover { color: var(--white); }
.hero-breadcrumb .sep { margin: 0 0.5rem; opacity: 0.4; }
.hero-row { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem; align-items: center; }
.hero-logo { width: 88px; height: 88px; border-radius: 18px; background: var(--white); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; border: 1px solid var(--border-light); }
.hero-logo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.hero-logo .hero-logo-fallback { display: none; font-family: 'Source Serif 4', serif; font-size: 2rem; font-weight: 600; color: var(--navy); }
.hero-logo.is-fallback img { display: none; }
.hero-logo.is-fallback .hero-logo-fallback { display: block; }
.hero-content { min-width: 0; }
.hero-eyebrow { font-family: 'Source Serif 4', Georgia, serif; font-style: italic; color: var(--orange); font-size: 0.9375rem; margin-bottom: 0.4rem; }
.hero h1 { font-family: 'Source Serif 4', Georgia, serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; line-height: 1.05; letter-spacing: -0.015em; margin-bottom: 0.4rem; }
.hero-subtitle { color: var(--text-light); font-size: 1rem; line-height: 1.5; }
.hero-subtitle .pill {
    display: inline-block; padding: 0.1rem 0.55rem;
    background: rgba(139,92,246,0.18); color: #C4B5FD;
    border: 1px solid rgba(139,92,246,0.4); border-radius: 999px;
    font-size: 0.75rem; font-weight: 500; letter-spacing: 0.01em;
    vertical-align: 1px; margin-left: 0.35rem;
}
.hero-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.hero-meta-line { margin-top: 1.5rem; font-size: 0.8125rem; color: var(--text-faint); line-height: 1.55; }
.hero-meta-line a { color: var(--text-light); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 720px) {
    .hero { padding: 3rem 1.25rem 1.5rem; }
    .hero-row { grid-template-columns: auto 1fr; }
    .hero-actions { grid-column: 1 / -1; margin-top: 0.75rem; }
    .hero-logo { width: 64px; height: 64px; border-radius: 14px; }
}

/* KPI metrics row — value shown as a range, sparkline visible, with locked CTA */
.hero-metrics { max-width: 1140px; margin: 0 auto; padding: 0.5rem 2rem 1.5rem; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.kpi-card { background: rgba(0,0,0,0.25); border: 1px solid var(--border-light); border-radius: 14px; padding: 1rem 1.1rem; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; }
.kpi-label { color: var(--text-lighter); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; display: flex; align-items: center; gap: 0.4rem; }
.kpi-trend { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.6875rem; font-weight: 600; color: var(--teal); background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); padding: 0.1rem 0.45rem; border-radius: 999px; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.kpi-trend.is-neutral { color: var(--text-lighter); background: rgba(255,255,255,0.05); border-color: var(--border-light); }
.kpi-trend.is-neutral .arrow { color: var(--text-faint); }
.kpi-trend .arrow { font-size: 0.65rem; }
.kpi-trend .v-blur { display: inline-block; color: var(--text-faint); filter: blur(2.5px); user-select: none; min-width: 1.6em; text-align: center; }
.kpi-value { font-family: 'Source Serif 4', Georgia, serif; font-size: 1.75rem; font-weight: 500; line-height: 1.1; margin-top: 0.55rem; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--white); }
.kpi-range-caption { color: var(--text-faint); font-size: 0.6875rem; letter-spacing: 0.04em; text-transform: uppercase; margin-top: 0.3rem; }
.kpi-spark { margin-top: 0.6rem; width: 100%; height: 32px; display: block; opacity: 0.85; }
.kpi-locked-cta { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.55rem; font-size: 0.75rem; color: var(--text-light); text-decoration: none; }
.kpi-locked-cta::before { content: "🔒"; font-size: 0.65rem; }
.kpi-locked-cta:hover { color: var(--white); }
@media (max-width: 800px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .kpi-grid { grid-template-columns: 1fr; } }

/* Ranking strip */
.ranking-strip { background: var(--navy); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.ranking-strip-inner { max-width: 1140px; margin: 0 auto; padding: 1rem 2rem; display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.ranking-strip-label { color: var(--text-faint); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; margin-right: 0.5rem; }
.rank-chip { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.4rem 0.85rem; background: rgba(59,130,246,0.10); border: 1px solid rgba(59,130,246,0.35); border-radius: 999px; color: var(--white); text-decoration: none; font-size: 0.8125rem; font-weight: 500; transition: background 0.15s ease, border-color 0.15s ease; }
.rank-chip:hover { background: rgba(59,130,246,0.18); border-color: rgba(59,130,246,0.6); }
.rank-chip .rank-num { color: var(--blue); font-weight: 600; font-variant-numeric: tabular-nums; }
.rank-chip-purple { background: rgba(139,92,246,0.12); border-color: rgba(139,92,246,0.4); }
.rank-chip-purple .rank-num { color: #C4B5FD; }
.rank-chip-purple:hover { background: rgba(139,92,246,0.22); }

/* Body sections */
section.body-section { padding: 3rem 2rem; }
section.body-section.alt { background: var(--navy-light); }
.body-inner { max-width: 1140px; margin: 0 auto; }

.section-eyebrow { font-family: 'Source Serif 4', Georgia, serif; font-style: italic; color: var(--orange); font-size: 0.9375rem; margin-bottom: 0.5rem; }
.section-title { font-family: 'Source Serif 4', Georgia, serif; font-size: 1.75rem; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.section-sub { color: var(--text-light); font-size: 1rem; margin-bottom: 1.75rem; max-width: 720px; }

/* Brief description */
.blurb-inner { max-width: 760px; margin: 0 auto; padding: 2.5rem 2rem; }
.blurb-inner p { color: var(--text-light); font-size: 1.0625rem; line-height: 1.65; margin-bottom: 0.9rem; }
.blurb-inner p:last-child { margin-bottom: 0; }
.blurb-inner p strong { color: var(--white); font-weight: 600; }
.blurb-inner p a { color: var(--blue); text-decoration: none; }
.blurb-inner p a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Backers grouped by stage */
.backer-stage-group { margin-bottom: 1.75rem; }
.backer-stage-group:last-child { margin-bottom: 0; }
.backer-stage-header { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.85rem; padding-bottom: 0.55rem; border-bottom: 1px solid var(--border-light); }
.backer-stage-chip { display: inline-flex; align-items: center; font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.25rem 0.65rem; border-radius: 999px; font-variant-numeric: tabular-nums; }
.backer-stage-chip.stage-Seed     { color: #6EE7B7; background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.3); }
.backer-stage-chip.stage-SeriesA  { color: #93C5FD; background: rgba(59, 130, 246, 0.14); border: 1px solid rgba(59, 130, 246, 0.32); }
.backer-stage-chip.stage-SeriesBp { color: #C4B5FD; background: rgba(124, 58, 237, 0.16); border: 1px solid rgba(124, 58, 237, 0.35); }
.backer-stage-chip.stage-Other    { color: var(--text-light); background: rgba(255,255,255,0.06); border: 1px solid var(--border-light); }
.backer-stage-count { font-size: 0.8125rem; color: var(--text-lighter); font-variant-numeric: tabular-nums; }
.backer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.75rem; }
.backer-card { display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 1rem; background: rgba(0,0,0,0.2); border: 1px solid var(--border-light); border-radius: 12px; text-decoration: none; color: inherit; transition: background 0.12s ease, border-color 0.12s ease; position: relative; }
.backer-card:hover { background: rgba(255,255,255,0.04); border-color: var(--border-mid); }
.backer-logo { width: 36px; height: 36px; border-radius: 8px; background: var(--white); flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--border-light); }
.backer-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.backer-meta { min-width: 0; }
.backer-name { font-size: 0.9375rem; font-weight: 500; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.backer-loc { font-size: 0.75rem; color: var(--text-lighter); margin-top: 0.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Spin-out / alumni startups */
.alumni-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; margin-bottom: 1.75rem; }
.alumni-stat { background: rgba(0,0,0,0.22); border: 1px solid var(--border-light); border-radius: 12px; padding: 0.85rem 1rem; }
.alumni-stat-num { font-family: 'Source Serif 4', Georgia, serif; font-size: 1.625rem; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.alumni-stat-label { color: var(--text-lighter); font-size: 0.75rem; margin-top: 0.25rem; letter-spacing: 0.02em; }
.alumni-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; }
.alumni-card { background: rgba(0,0,0,0.22); border: 1px solid var(--border-light); border-radius: 12px; padding: 0.95rem 1.1rem; display: flex; flex-direction: column; text-decoration: none; transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease; }
.alumni-card:hover { background: rgba(255,255,255,0.04); border-color: var(--border-mid); transform: translateY(-1px); }
.alumni-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.45rem; }
.alumni-name { font-family: 'Source Serif 4', Georgia, serif; font-size: 1.0625rem; font-weight: 500; color: var(--white); line-height: 1.2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alumni-funding { display: inline-flex; align-items: center; color: #FBBF77; font-size: 0.6875rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; padding: 0.1rem 0.45rem; background: rgba(242, 165, 94, 0.12); border: 1px solid rgba(242, 165, 94, 0.28); border-radius: 999px; letter-spacing: 0.02em; }
.alumni-founder { color: var(--text-light); font-size: 0.8125rem; display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.25rem; }
.alumni-avatar { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #8B5CF6, #3B82F6); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.02em; flex-shrink: 0; }
.alumni-signal { color: var(--text-lighter); font-size: 0.75rem; margin-top: 0.35rem; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 0.3rem; }
.alumni-signal strong { color: var(--white); font-weight: 600; }
.alumni-signal::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); display: inline-block; box-shadow: 0 0 6px rgba(16,185,129,0.6); }
.alumni-cta { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; }
.alumni-cta a { color: var(--blue); text-decoration: none; }
.alumni-cta a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 2px; }
.alumni-country { margin-left: auto; display: inline-flex; align-items: center; line-height: 1; flex-shrink: 0; }
.alumni-country .cc-flag { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", emoji, sans-serif; font-size: 1rem; line-height: 1; }
.alumni-country .cc-text { display: none; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.04em; padding: 0.1rem 0.35rem; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-radius: 4px; color: var(--text-light); font-variant-numeric: tabular-nums; }
html.no-flag-emoji .alumni-country .cc-flag { display: none; }
html.no-flag-emoji .alumni-country .cc-text { display: inline-flex; }

/* Global footprint — AI talent + workforce + traffic by country */
.footprint-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 1rem; }
@media (max-width: 1000px) { .footprint-grid { grid-template-columns: 1fr; } }
.footprint-card { background: rgba(0,0,0,0.22); border: 1px solid var(--border-light); border-radius: 14px; padding: 1.25rem 1.4rem 1.4rem; display: flex; flex-direction: column; }
.footprint-eyebrow { color: var(--text-lighter); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.55rem; }
.footprint-title { font-family: 'Source Serif 4', Georgia, serif; font-size: 1.125rem; font-weight: 500; line-height: 1.3; margin-bottom: 1rem; }
.footprint-headline { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 1rem; }
.footprint-headline-num { font-family: 'Source Serif 4', Georgia, serif; font-size: 2rem; font-weight: 500; line-height: 1; color: var(--white); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.footprint-headline-label { color: var(--text-lighter); font-size: 0.8125rem; line-height: 1.3; }

/* AI talent stacked bar */
.ai-talent-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: rgba(255,255,255,0.05); margin-bottom: 0.85rem; }
.ai-talent-bar > span { display: block; height: 100%; }
.ai-talent-bar .seg-core { background: linear-gradient(90deg, #8B5CF6, #6D28D9); }
.ai-talent-bar .seg-other { background: linear-gradient(90deg, #3B82F6, #2563EB); }
.ai-talent-bar .seg-non { background: rgba(255,255,255,0.08); }
.ai-talent-legend { display: flex; flex-direction: column; gap: 0.55rem; }
.ai-talent-row { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 0.6rem; align-items: center; font-size: 0.8125rem; }
.ai-talent-dot { width: 10px; height: 10px; border-radius: 3px; }
.ai-talent-row .label { color: var(--text-light); }
.ai-talent-row .count { color: var(--text-lighter); font-variant-numeric: tabular-nums; }
.ai-talent-row .pct { color: var(--white); font-weight: 600; font-variant-numeric: tabular-nums; min-width: 3em; text-align: right; }

/* Country breakdown bars */
.country-list { display: flex; flex-direction: column; gap: 0.55rem; }
.country-row { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; font-size: 0.8125rem; color: var(--text-light); }
.country-bar-track { grid-column: 1 / -1; height: 4px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; margin-top: 0.15rem; }
.country-bar-fill { height: 100%; background: linear-gradient(90deg, #3B82F6, #8B5CF6); border-radius: 999px; }
.country-row .pct { color: var(--white); font-weight: 600; font-variant-numeric: tabular-nums; }
.country-row.is-traffic .country-bar-fill { background: linear-gradient(90deg, #10B981, #3B82F6); }
.country-meta-foot { margin-top: 0.85rem; font-size: 0.75rem; color: var(--text-faint); }

/* Patent intelligence */
.patent-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 1rem; }
@media (max-width: 800px) { .patent-grid { grid-template-columns: 1fr; } }
.patent-summary, .patent-breakdown { background: rgba(0,0,0,0.22); border: 1px solid var(--border-light); border-radius: 14px; padding: 1.4rem 1.5rem; display: flex; flex-direction: column; }
.patent-eyebrow { color: var(--text-lighter); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.55rem; }
.patent-headline-num { font-family: 'Source Serif 4', Georgia, serif; font-size: 3rem; font-weight: 500; line-height: 1; color: var(--white); letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.patent-headline-num.is-zero { color: var(--text-lighter); }
.patent-headline-sub { color: var(--text-light); font-size: 0.9375rem; margin-top: 0.5rem; line-height: 1.45; }
.patent-status-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.1rem; }
.patent-status-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.7rem; background: rgba(255,255,255,0.05); border: 1px solid var(--border-light); border-radius: 999px; font-size: 0.75rem; color: var(--text-light); font-variant-numeric: tabular-nums; }
.patent-status-chip strong { color: var(--white); font-weight: 600; }
.patent-status-chip.granted strong { color: var(--teal); }
.patent-status-chip.pending strong { color: #93C5FD; }
.patent-empty { margin-top: 1rem; padding: 1rem 1.1rem; background: rgba(255,255,255,0.03); border: 1px dashed var(--border-light); border-radius: 12px; color: var(--text-light); font-size: 0.875rem; line-height: 1.55; }
.patent-empty strong { color: var(--white); font-weight: 600; }
.patent-breakdown-title { font-family: 'Source Serif 4', Georgia, serif; font-size: 1.0625rem; font-weight: 500; line-height: 1.3; margin-bottom: 1rem; }
.patent-cat-list { display: flex; flex-direction: column; gap: 0.65rem; }
.patent-cat-row { display: grid; grid-template-columns: 1fr auto auto; gap: 0.6rem; font-size: 0.8125rem; color: var(--text-light); align-items: center; }
.patent-cat-bar { grid-column: 1 / -1; height: 5px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; margin-top: 0.15rem; }
.patent-cat-bar-fill { height: 100%; background: linear-gradient(90deg, #8B5CF6, #3B82F6); border-radius: 999px; }
.patent-cat-row .count { color: var(--text-lighter); font-variant-numeric: tabular-nums; }
.patent-cat-row .pct { color: var(--white); font-weight: 600; font-variant-numeric: tabular-nums; min-width: 3em; text-align: right; }

/* Patent shape — peer comparison spider chart */
.pshape-card { background: var(--navy); border: 1px solid var(--border-light); border-radius: 16px; padding: 1.5rem 1.5rem 1.25rem; margin-top: 1.5rem; }
.pshape-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 0.625rem 0.75rem; margin-bottom: 1.25rem; }
.pshape-picker-label { color: var(--text-lighter); font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; margin-right: 0.5rem; }
.pshape-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pshape-pill { display: inline-flex; align-items: center; gap: 5px; padding: 0.4rem 0.85rem; border-radius: 999px; border: 1px solid var(--border-light); background: rgba(255,255,255,0.03); color: var(--text-light); font-family: inherit; font-size: 0.8125rem; font-weight: 500; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.pshape-pill:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.pshape-pill.is-selected { background: color-mix(in srgb, var(--p-color) 14%, transparent); border-color: var(--p-color); color: var(--white); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--p-color) 40%, transparent); }
.pshape-pill.is-selected.is-pinned { background: color-mix(in srgb, var(--orange-accent) 18%, transparent); border-color: var(--orange-accent); color: var(--white); cursor: default; }
.pshape-pill.is-pinned { --p-color: var(--orange-accent); }
.pshape-pin { color: var(--orange-accent); font-size: 0.75rem; line-height: 1; }
.pshape-similar { display: inline-flex; align-items: center; gap: 4px; background: rgba(124,58,237,0.10); border: 1px solid rgba(124,58,237,0.30); color: #C4B5FD; font-family: inherit; font-size: 0.8125rem; font-weight: 600; padding: 0.4rem 0.875rem; border-radius: 999px; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease; }
.pshape-similar:hover { background: rgba(124,58,237,0.18); border-color: rgba(124,58,237,0.5); }
.pshape-similar-icon { font-size: 0.875rem; line-height: 1; }
.pshape-clear { background: none; border: 0; color: var(--text-lighter); font-family: inherit; font-size: 0.75rem; cursor: pointer; padding: 0.25rem 0.5rem; margin-left: 0.5rem; text-decoration: underline; text-underline-offset: 2px; }
.pshape-clear:hover { color: var(--white); }
.pshape-chart { background: rgba(255,255,255,0.022); border: 1px solid var(--border-light); border-radius: 12px; padding: 1rem 1rem 0.75rem; margin: 0; }
.pshape-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 0.5rem; }
.pshape-chart-head h3 { margin: 0; font-size: 0.9375rem; font-weight: 600; color: var(--white); }
.pshape-chart-sub { color: var(--text-lighter); font-size: 0.75rem; }
.pshape-radar { width: 100%; height: auto; display: block; max-width: 720px; margin: 0 auto; }
.pshape-foot { color: var(--text-lighter); font-size: 0.75rem; line-height: 1.5; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.06); margin-top: 1rem; }
@media (max-width: 600px) { .pshape-pill { padding: 0.3rem 0.65rem; font-size: 0.75rem; } }
/* Bump radar SVG text on mobile — viewBox is 600 wide so a 360px-wide phone
   shrinks the 12/11px attribute font-sizes to ~7px effective. CSS overrides
   the SVG attribute and the values are interpreted in viewBox user-units. */
@media (max-width: 720px) {
    .pshape-radar text { font-size: 22px; }
    .pshape-radar tspan { font-size: 20px; }
}

/* Locked / blurred teaser cards */
.teaser-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 800px) { .teaser-grid { grid-template-columns: 1fr; } }
.teaser-card { background: rgba(0,0,0,0.22); border: 1px solid var(--border-light); border-radius: 14px; padding: 1.25rem 1.4rem 1.4rem; position: relative; overflow: hidden; }
.teaser-eyebrow { color: var(--text-lighter); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.85rem; display: flex; align-items: center; gap: 0.4rem; }
.teaser-eyebrow::before { content: "🔒"; font-size: 0.7rem; }
.teaser-title { font-family: 'Source Serif 4', Georgia, serif; font-size: 1.125rem; font-weight: 500; margin-bottom: 0.3rem; line-height: 1.3; }
.teaser-rows { margin-top: 0.85rem; display: flex; flex-direction: column; gap: 0.55rem; position: relative; }
.teaser-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 0.85rem; padding: 0.4rem 0; border-top: 1px solid rgba(255,255,255,0.05); }
.teaser-row:first-child { border-top: none; }
.teaser-label { color: var(--text-lighter); font-size: 0.8125rem; }
.teaser-bar { height: 14px; border-radius: 5px; background: linear-gradient(90deg, rgba(59,130,246,0.45), rgba(139,92,246,0.4)); filter: blur(5px); opacity: 0.6; }
.teaser-bar.short { width: 35%; }
.teaser-bar.med { width: 55%; }
.teaser-bar.long { width: 78%; }
.teaser-fade { position: absolute; left: 0; right: 0; bottom: -1.4rem; height: 60%; background: linear-gradient(180deg, transparent, var(--navy-light) 95%); pointer-events: none; }
.teaser-cta { position: relative; margin-top: 1rem; display: inline-flex; align-items: center; gap: 0.4rem; color: var(--blue); text-decoration: none; font-size: 0.875rem; font-weight: 500; z-index: 2; }
.teaser-cta:hover { color: var(--white); }
.teaser-cta::after { content: "→"; transition: transform 0.15s ease; }
.teaser-cta:hover::after { transform: translateX(3px); }

/* CTA band */
.cta-band { background: linear-gradient(180deg, var(--navy-light), var(--navy)); padding: 4rem 2rem; border-top: 1px solid var(--border-light); text-align: center; }
.cta-band-inner { max-width: 720px; margin: 0 auto; }
.cta-band h2 { font-family: 'Source Serif 4', Georgia, serif; font-weight: 500; font-size: 2rem; line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 0.6rem; }
.cta-band p { color: var(--text-light); font-size: 1.0625rem; margin-bottom: 1.75rem; }
.cta-band-actions { display: inline-flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
    .kpi-value.blurred { filter: blur(7px); }
}
@media (max-width: 720px) {
    section.body-section { padding: 2.25rem 1.25rem; }
    .section-title { font-size: 1.4rem; }
    .ranking-strip-inner { padding: 0.85rem 1.25rem; }
}

/* In-page TOC sidebar — fixed left, fades in past the hero, FAB on narrow viewports. */
.toc-sidebar { position: fixed; top: 84px; left: 16px; width: 224px; max-height: calc(100vh - 104px); overflow-y: auto; padding: 0.875rem 0 0; background: rgba(20, 27, 45, 0.45); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 10px; z-index: 90; opacity: 0; transform: translateX(-6px); transition: opacity 0.3s ease, transform 0.3s ease; pointer-events: none; scrollbar-width: thin; scrollbar-color: var(--navy-lighter) transparent; }
.toc-sidebar.visible { opacity: 1; transform: translateX(0); pointer-events: auto; }
.toc-sidebar::-webkit-scrollbar { width: 4px; }
.toc-sidebar::-webkit-scrollbar-thumb { background: var(--navy-lighter); border-radius: 4px; }
.toc-eyebrow { padding: 0 1rem 0.5rem; font-size: 0.625rem; font-weight: 600; color: rgba(255, 255, 255, 0.4); text-transform: uppercase; letter-spacing: 0.1em; }
.toc-nav { list-style: none; margin: 0; padding: 0; }
.toc-link { display: flex; align-items: baseline; gap: 0.625rem; padding: 0.4rem 1rem 0.4rem 0.875rem; text-decoration: none; color: rgba(255, 255, 255, 0.55); font-size: 0.8125rem; font-weight: 500; line-height: 1.3; border-left: 2px solid transparent; transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease; }
.toc-link:hover { color: var(--white); background: rgba(255, 255, 255, 0.04); }
.toc-link.active { color: var(--white); border-left-color: var(--blue); background: rgba(59, 130, 246, 0.07); font-weight: 600; }
.toc-num { font-family: 'Source Serif 4', Georgia, serif; font-size: 0.75rem; color: var(--blue); min-width: 0.875rem; font-variant-numeric: tabular-nums; }
.toc-progress { height: 2px; background: rgba(255, 255, 255, 0.05); margin-top: 0.5rem; border-radius: 0 0 10px 10px; overflow: hidden; }
.toc-progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--blue), #10B981); transition: width 0.15s ease; }
.toc-fab { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; background: rgba(20, 27, 45, 0.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.75); display: none; align-items: center; justify-content: center; cursor: pointer; z-index: 95; opacity: 0; transform: scale(0.92); transition: opacity 0.25s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease; pointer-events: none; padding: 0; }
.toc-fab.visible { opacity: 1; transform: scale(1); pointer-events: auto; }
.toc-fab:hover { background: rgba(59, 130, 246, 0.22); color: var(--white); }
.toc-fab svg { width: 18px; height: 18px; display: block; }
@media (max-width: 1320px) {
    .toc-sidebar { top: auto; bottom: 74px; right: 18px; left: auto; width: 240px; max-height: calc(100vh - 120px); transform: translateY(8px); transition: opacity 0.25s ease, transform 0.25s ease; }
    .toc-sidebar.visible:not(.mobile-open) { opacity: 0; transform: translateY(8px); pointer-events: none; }
    .toc-sidebar.mobile-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
    .toc-fab { display: flex; }
}
