/* SalesNow Data Lab — Design System v4 (Super Design-Rich) */
/* Shared across all /insights/ pages */

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
    /* Brand: Teal */
    --teal-700: #0A757A;
    --teal-600: #119197;
    --teal-500: #1F9399;
    --teal-400: #3AABB0;
    --teal-100: #D4F0EE;
    --teal-50:  #EEF8F7;

    /* Accent: Matte Gold */
    --accent:   #C5A55A;
    --accent-bg: #F7F0E0;

    /* Ink Scale */
    --ink-900: #0D0D0D;
    --ink-800: #1A1A1A;
    --ink-700: #2D2D2D;
    --ink-500: #6B7B8D;
    --ink-300: #B0BEC5;
    --ink-100: #E8ECEF;
    --ink-50:  #F5F6F8;
    --white:   #FFFFFF;

    /* Semantic */
    --success:    #0F7B5F;
    --success-bg: #E6F5F0;
    --danger:     #B91C1C;
    --danger-bg:  #FEF2F2;
    --warning:    #92400E;
    --warning-bg: #FFFBEB;

    /* Surfaces */
    --hero-bg:      #0D1117;
    --hero-text:    #F0F2F5;
    --hero-muted:   rgba(240, 242, 245, 0.7);
    --hero-border:  rgba(240, 242, 245, 0.08);
    --hero-surface: rgba(240, 242, 245, 0.04);
    --footer-bg:    #202830;

    /* Typography */
    --font-heading: 'Noto Serif JP', 'Noto Sans JP', serif;
    --font-body:    'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-kpi:     'Noto Sans JP', sans-serif;
    --font-mono:    'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;

    /* Motion */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 200ms;
    --duration-slow: 400ms;
    --duration-entrance: 600ms;

    /* Glass morphism tokens */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: 16px;
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);

    /* Gradients */
    --gradient-teal: linear-gradient(135deg, var(--teal-600), var(--teal-400));
    --gradient-teal-gold: linear-gradient(135deg, var(--teal-500), var(--accent));
    --gradient-subtle: linear-gradient(135deg, var(--teal-50), var(--accent-bg));
    --gradient-dark: linear-gradient(135deg, #0D1117, #1A2332);

    /* Scroll progress */
    --scroll-progress: 0%;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--ink-700);
    background: var(--white);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--scroll-progress, 0%);
    height: 3px;
    background: var(--gradient-teal-gold);
    z-index: 9999;
    transition: width 50ms linear;
    box-shadow: 0 0 8px rgba(31, 147, 153, 0.4);
}

/* ============================================================
   CUSTOM SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--teal-400);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--teal-500);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--teal-400) transparent;
}

/* ============================================================
   PAGE LOAD ORCHESTRATION — .reveal with stagger
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--duration-entrance) var(--ease-out-expo),
                transform var(--duration-entrance) var(--ease-out-expo);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }
.reveal[data-delay="5"] { transition-delay: 400ms; }
.reveal[data-delay="6"] { transition-delay: 480ms; }

/* ============================================================
   HEADER (Enhanced Frosted Glass)
   ============================================================ */
.header {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid transparent;
    transition: border-color var(--duration-normal) var(--ease-out-expo),
                box-shadow var(--duration-normal) var(--ease-out-expo),
                background var(--duration-normal) var(--ease-out-expo);
}
.header--scrolled {
    border-bottom-color: rgba(31, 147, 153, 0.12);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04),
                0 4px 16px rgba(31, 147, 153, 0.04);
    background: rgba(255, 255, 255, 0.95);
}
.header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 32px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    font-family: 'Jost', var(--font-body);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: var(--ink-800);
    display: flex;
    align-items: flex-end;
    gap: 6px;
    transition: filter var(--duration-normal);
}
.logo:hover {
    filter: drop-shadow(0 0 6px rgba(31, 147, 153, 0.35));
}
.logo-img { height: 28px; width: auto; display: block; }

/* Nav */
.header-nav { display: flex; align-items: center; gap: 24px; }
.header-nav a {
    color: var(--ink-500);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color var(--duration-fast);
    position: relative;
}
/* Animated underline from CENTER */
.header-nav a:not(.nav-cta)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 100%;
    height: 1.5px;
    background: var(--gradient-teal);
    transform: scaleX(0) translateX(-50%);
    transform-origin: center;
    transition: transform var(--duration-normal) var(--ease-in-out-quart);
}
.header-nav a:not(.nav-cta):hover { color: var(--ink-800); }
.header-nav a:not(.nav-cta):hover::after {
    transform: scaleX(1) translateX(-50%);
}

/* CTA Button — gradient + shimmer */
.nav-cta {
    background: var(--gradient-teal);
    color: var(--white) !important;
    padding: 6px 16px;
    border-radius: 4px;
    font-weight: 600;
    transition: box-shadow var(--duration-normal), transform var(--duration-fast);
    position: relative;
    overflow: hidden;
}
.nav-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(50%); }
}
.nav-cta:hover {
    box-shadow: 0 4px 16px rgba(31, 147, 153, 0.3);
    transform: translateY(-1px);
}

/* ============================================================
   HERO (Report — Animated Gradient Mesh)
   ============================================================ */
.hero {
    background: var(--hero-bg);
    color: var(--hero-text);
    padding: 64px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
/* Animated gradient mesh */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 60%, rgba(31, 147, 153, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 80% 30%, rgba(197, 165, 90, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 60% 80%, rgba(31, 147, 153, 0.06) 0%, transparent 60%);
    pointer-events: none;
    animation: heroMesh 12s ease-in-out infinite alternate;
}
@keyframes heroMesh {
    0% {
        background:
            radial-gradient(ellipse 60% 50% at 20% 60%, rgba(31, 147, 153, 0.12) 0%, transparent 70%),
            radial-gradient(ellipse 50% 40% at 80% 30%, rgba(197, 165, 90, 0.08) 0%, transparent 70%),
            radial-gradient(ellipse 40% 40% at 60% 80%, rgba(31, 147, 153, 0.06) 0%, transparent 60%);
    }
    50% {
        background:
            radial-gradient(ellipse 55% 55% at 30% 50%, rgba(31, 147, 153, 0.15) 0%, transparent 70%),
            radial-gradient(ellipse 45% 45% at 70% 40%, rgba(197, 165, 90, 0.10) 0%, transparent 70%),
            radial-gradient(ellipse 50% 35% at 50% 70%, rgba(31, 147, 153, 0.08) 0%, transparent 60%);
    }
    100% {
        background:
            radial-gradient(ellipse 50% 45% at 25% 55%, rgba(31, 147, 153, 0.10) 0%, transparent 70%),
            radial-gradient(ellipse 55% 50% at 75% 25%, rgba(197, 165, 90, 0.12) 0%, transparent 70%),
            radial-gradient(ellipse 45% 45% at 55% 75%, rgba(31, 147, 153, 0.07) 0%, transparent 60%);
    }
}
/* Subtle noise overlay */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.4;
}
.hero-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Badge — glass morphism + pulse */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(240, 242, 245, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(240, 242, 245, 0.12);
    color: var(--teal-400);
    padding: 5px 16px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    animation: badgePulse 4s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(58, 171, 176, 0); }
    50%      { box-shadow: 0 0 0 4px rgba(58, 171, 176, 0.08); }
}

/* h1 */
.hero h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}
/* Gradient text option */
.hero-title--gradient {
    background: linear-gradient(135deg, var(--hero-text) 0%, var(--teal-400) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtitle */
.hero-subtitle {
    font-size: 15px;
    color: var(--hero-muted);
    max-width: 640px;
    margin: 0 auto 20px;
    line-height: 1.8;
    letter-spacing: 0.04em;
}

/* Meta info — dot dividers */
.hero-meta {
    font-size: 12px;
    color: rgba(240, 242, 245, 0.7);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.hero-meta span + span::before {
    content: '\00B7';
    margin-right: 12px;
    opacity: 0.5;
    font-weight: 700;
}

/* ============================================================
   CONTENT AREA
   ============================================================ */
.content {
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 24px;
}
/* Wider option for data-heavy pages */
.content--wide {
    max-width: 1080px;
}

/* Section dividers */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ink-100), var(--teal-100), var(--ink-100), transparent);
    margin: 48px 0;
    border: none;
}

/* ============================================================
   SUMMARY CARD — Glass morphism + gradient border
   ============================================================ */
.summary-card {
    background: linear-gradient(135deg, rgba(238, 248, 247, 0.7), rgba(247, 240, 224, 0.3));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(31, 147, 153, 0.1);
    border-left: 3px solid transparent;
    border-image: linear-gradient(180deg, var(--teal-500), var(--accent)) 1;
    border-image-slice: 0 0 0 1;
    padding: 24px 32px;
    border-radius: 0 4px 4px 0;
    margin-bottom: 48px;
    font-size: 15px;
    line-height: 1.8;
    box-shadow: 0 4px 24px rgba(31, 147, 153, 0.04);
    transition: box-shadow var(--duration-normal) var(--ease-out);
}
.summary-card:hover {
    box-shadow: 0 8px 32px rgba(31, 147, 153, 0.08);
}
.summary-card strong {
    color: var(--ink-800);
}

/* ============================================================
   KPI GRID — Glass cards + glow
   ============================================================ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}
.kpi-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 20px 24px;
    text-align: center;
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal);
}
.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(31, 147, 153, 0.1);
    border-color: rgba(31, 147, 153, 0.2);
}
.kpi-value {
    font-family: var(--font-kpi);
    font-size: 28px;
    font-weight: 700;
    color: var(--ink-800);
    line-height: 1.2;
    text-shadow: 0 0 40px rgba(31, 147, 153, 0.08);
}
/* Gradient text option for KPI numbers */
.kpi-value--gradient {
    background: var(--gradient-teal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.kpi-label {
    font-size: 13px;
    color: var(--ink-500);
    margin-top: 4px;
}
/* Enhanced change indicators — pill style */
.kpi-change {
    font-size: 12px;
    margin-top: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
}
.kpi-change.positive {
    color: var(--success);
    background: var(--success-bg);
}
.kpi-change.negative {
    color: var(--danger);
    background: var(--danger-bg);
}
.kpi-change.neutral {
    color: var(--ink-500);
    background: var(--ink-50);
}

/* ============================================================
   SURVEY / METHODOLOGY
   ============================================================ */
.survey-section {
    background: var(--ink-50);
    border: 1px solid var(--ink-100);
    border-radius: 4px;
    padding: 24px 32px;
    margin-bottom: 48px;
}
.survey-section h2 {
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--ink-500);
    margin-bottom: 16px;
    font-weight: 600;
}
.survey-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px 16px;
    font-size: 14px;
}
.survey-label {
    font-weight: 600;
    color: var(--ink-500);
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--ink-800);
    margin-bottom: 24px;
    letter-spacing: 0.02em;
}

/* ============================================================
   FINDINGS — gradient number badge + glow
   ============================================================ */
.finding {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--ink-100);
}
.finding:last-child {
    border-bottom: none;
}
.finding-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-teal-gold);
    color: white;
    font-size: 13px;
    font-weight: 700;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(31, 147, 153, 0.2);
}
.finding h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--ink-800);
    letter-spacing: 0.02em;
}
.finding p {
    font-size: 15px;
    margin-bottom: 16px;
}
/* Note — glass card */
.finding .note {
    font-size: 13px;
    color: var(--ink-500);
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 14px 18px;
    margin-top: 8px;
}

/* ============================================================
   CHARTS — Glass container + dot pattern
   ============================================================ */
.chart-section {
    margin-bottom: 48px;
}
.chart-container {
    background: white;
    border: 1px solid var(--ink-100);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}
/* Subtle dot pattern background */
.chart-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--ink-100) 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    opacity: 0.4;
    pointer-events: none;
}
.chart-container canvas {
    max-height: 400px;
    position: relative;
    z-index: 1;
}
@media (max-width: 768px) {
    .chart-container {
        padding: 12px 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    .chart-container canvas {
        max-height: none;
        min-height: 300px;
        min-width: 480px;
    }
}

/* Chart source — enhanced typography */
.chart-source {
    font-size: 12px;
    color: var(--ink-500);
    margin-top: 8px;
    font-style: italic;
    letter-spacing: 0.02em;
}

/* Chart actions — glass buttons */
.chart-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.chart-actions button {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    color: var(--ink-700);
    font-family: var(--font-body);
    transition: all var(--duration-fast);
}
.chart-actions button:hover {
    background: var(--teal-50);
    border-color: var(--teal-500);
    color: var(--teal-700);
}
.chart-actions button.active {
    background: var(--teal-500);
    color: white;
    border-color: var(--teal-500);
    box-shadow: 0 0 12px rgba(31, 147, 153, 0.2);
}

/* ============================================================
   DATA TABLES — Gradient header + enhanced hover
   ============================================================ */
.data-table-wrapper {
    overflow-x: auto;
    margin-top: 16px;
    border-radius: 8px;
    border: 1px solid var(--ink-100);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
/* Gradient header */
.data-table thead {
    background: linear-gradient(135deg, var(--ink-50), var(--teal-50));
}
.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--ink-500);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--ink-100);
    position: relative;
}
.data-table th.right,
.data-table td.right {
    text-align: right;
}
/* Sortable headers */
.data-table th[data-sortable] {
    cursor: pointer;
    user-select: none;
}
.data-table th[data-sortable]:hover {
    color: var(--teal-600);
}
.data-table th[data-sortable]::after {
    content: '\21C5';
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.4;
}
.data-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--ink-100);
    transition: all var(--duration-fast);
}
/* Alternating rows */
.data-table tbody tr:nth-child(even) {
    background: rgba(245, 246, 248, 0.5);
}
/* Row hover — glass effect with left accent */
.data-table tr:hover td {
    background: rgba(238, 248, 247, 0.5);
}
.data-table tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--teal-500);
}
/* Highlight rows — gradient */
.data-table .highlight {
    background: linear-gradient(90deg, var(--teal-50), rgba(238, 248, 247, 0.3)) !important;
    font-weight: 600;
}

@media (max-width: 600px) {
    .data-table { font-size: 12px; }
    .data-table th { padding: 8px 10px; font-size: 11px; }
    .data-table td { padding: 8px 10px; }
}

/* ============================================================
   CONTEXT BOX
   ============================================================ */
.context-box {
    background: var(--warning-bg);
    border: 1px solid #FDE68A;
    border-radius: 6px;
    padding: 20px 24px;
    margin-top: 24px;
    margin-bottom: 24px;
}
.context-box h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--warning);
    margin-bottom: 8px;
}
.context-box p {
    font-size: 13px;
    color: #78350F;
    margin-bottom: 0;
}
.context-box ul {
    font-size: 13px;
    color: #78350F;
    margin-left: 20px;
    margin-top: 4px;
}

/* ============================================================
   CITATION BOX — Glass morphism + gradient border
   ============================================================ */
.citation-box {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 32px;
    margin-top: 48px;
    position: relative;
    overflow: hidden;
}
/* Gradient border via pseudo-element */
.citation-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 1px;
    background: linear-gradient(135deg, var(--teal-400), var(--accent), var(--teal-400));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.citation-box h2 {
    font-size: 18px;
    margin-bottom: 16px;
}
.citation-format {
    margin-bottom: 16px;
}
.citation-format label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-500);
    display: block;
    margin-bottom: 4px;
}
/* Citation text — monospace + subtle bg */
.citation-text {
    background: rgba(245, 246, 248, 0.8);
    border: 1px solid var(--ink-100);
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.citation-text code {
    flex: 1;
    word-break: break-all;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-700);
}
/* Copy button — enhanced with glow + ripple */
.copy-btn {
    background: var(--gradient-teal);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    font-family: var(--font-body);
    font-weight: 600;
    transition: box-shadow var(--duration-fast), transform var(--duration-fast);
    position: relative;
    overflow: hidden;
}
.copy-btn:hover {
    box-shadow: 0 4px 16px rgba(31, 147, 153, 0.3);
    transform: translateY(-1px);
}
.copy-btn:active {
    transform: scale(0.96);
}
/* Ripple effect class (add via JS) */
.copy-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.5s ease-out;
    pointer-events: none;
}
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ============================================================
   FOOTER — Animated gradient top border
   ============================================================ */
.footer {
    background: var(--footer-bg);
    color: rgba(255, 255, 255, 0.7);
    padding: 48px 24px;
    text-align: center;
    font-size: 13px;
    position: relative;
}
/* Animated gradient top border */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--teal-500), var(--accent), var(--teal-400), var(--accent), var(--teal-500));
    background-size: 200% 100%;
    animation: footerBorder 6s ease-in-out infinite;
}
@keyframes footerBorder {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.footer-inner {
    max-width: 1080px;
    margin: 0 auto;
}
/* Brand text — gradient coloring */
.footer-brand {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(90deg, rgba(255,255,255,0.95), var(--teal-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    display: inline-block;
}
.footer p { margin-bottom: 4px; }
.footer a {
    color: var(--teal-400);
    text-decoration: none;
    transition: color var(--duration-fast);
    position: relative;
}
/* Footer link hover */
.footer a:hover { color: var(--teal-100); }
.footer-links {
    font-size: 13px;
    margin-bottom: 16px;
}
.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 8px;
    position: relative;
}
.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--teal-400);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--duration-normal) var(--ease-in-out-quart);
}
.footer-links a:hover { color: rgba(255, 255, 255, 0.95); }
.footer-links a:hover::after {
    transform: scaleX(1);
}
.footer-copy {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 16px;
}
.footer-columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    text-align: left;
    margin-bottom: 32px;
}
.footer-col-title {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}
.footer-col-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-col-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
    transition: color var(--duration-fast), padding-left var(--duration-fast);
}
.footer-col-links a:hover {
    color: rgba(255, 255, 255, 0.95);
    padding-left: 4px;
}

/* ============================================================
   TOAST — Glass morphism + slide-in
   ============================================================ */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    border: 1px solid rgba(58, 171, 176, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.4s var(--ease-out-expo), opacity 0.3s;
}
.toast.show {
    transform: translateX(0);
    opacity: 1;
}

/* ============================================================
   FORM ELEMENTS (Simulators) — Enhanced focus + glow
   ============================================================ */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-800);
    margin-bottom: 6px;
}
.form-group select,
.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--ink-100);
    border-radius: 6px;
    font-size: 16px;
    font-family: var(--font-body);
    color: var(--ink-700);
    background: var(--white);
    transition: border-color var(--duration-fast),
                box-shadow var(--duration-fast);
    appearance: none;
    -webkit-appearance: none;
}
/* Enhanced select dropdown arrow */
.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7B8D' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
/* Teal glow ring on focus */
.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(31, 147, 153, 0.15),
                0 0 16px rgba(31, 147, 153, 0.08);
}

/* Primary button — gradient + hover animation */
.btn-primary {
    background: var(--gradient-teal);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: box-shadow var(--duration-normal),
                transform var(--duration-fast);
    width: 100%;
    position: relative;
    overflow: hidden;
}
.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(31, 147, 153, 0.3);
    transform: translateY(-1px);
}
.btn-primary:active {
    transform: scale(0.98);
}

/* Secondary button */
.btn-secondary {
    background: var(--ink-50);
    color: var(--ink-700);
    border: 1px solid var(--ink-100);
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--duration-fast);
}
.btn-secondary:hover {
    background: var(--teal-50);
    border-color: var(--teal-500);
    color: var(--teal-700);
    transform: translateY(-1px);
}

/* ============================================================
   CARDS (Score Listing) — Glass + gradient border sweep
   ============================================================ */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 24px;
    transition: all var(--duration-normal) var(--ease-out);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
/* Gradient border sweep on hover */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 1px;
    background: linear-gradient(90deg, var(--teal-500), var(--accent), var(--teal-500));
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--duration-normal), background-position 0.8s ease;
    pointer-events: none;
}
.card:hover {
    box-shadow: 0 8px 32px rgba(31, 147, 153, 0.1);
    transform: translateY(-4px);
}
.card:hover::before {
    opacity: 1;
    background-position: 100% 0;
}
.card h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.5;
    color: var(--ink-800);
}
.card p {
    font-size: 13px;
    color: var(--ink-500);
    line-height: 1.7;
    flex: 1;
}
/* Tags — enhanced with inner glow */
.card-tag {
    display: inline-block;
    background: rgba(31, 147, 153, 0.06);
    color: var(--teal-600);
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 12px;
    margin-top: 12px;
    align-self: flex-start;
    border: 1px solid rgba(31, 147, 153, 0.1);
}
/* Icon containers — gradient backgrounds */
.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    background: var(--gradient-teal);
    color: white;
    font-size: 18px;
}

/* ============================================================
   FILTER BAR — Glass + glow active state
   ============================================================ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--ink-100);
}
.filter-btn {
    background: white;
    border: 1px solid var(--ink-100);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    color: var(--ink-500);
}
.filter-btn:hover {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: var(--teal-400);
    color: var(--teal-700);
}
/* Active — gradient + glow */
.filter-btn.active {
    background: var(--gradient-teal);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 12px rgba(31, 147, 153, 0.25);
}

/* ============================================================
   GRID
   ============================================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ============================================================
   RESULT SECTIONS (Simulators) — Glass morphism
   ============================================================ */
.result-section {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 32px;
    margin-top: 32px;
    box-shadow: var(--glass-shadow);
}
/* Score display — gradient text + countup-ready */
.score-display {
    text-align: center;
    margin-bottom: 24px;
}
.score-value {
    font-family: var(--font-kpi);
    font-size: 64px;
    font-weight: 700;
    background: var(--gradient-teal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    text-shadow: none;
    /* For countup animation */
    font-variant-numeric: tabular-nums;
}
.score-label {
    font-size: 14px;
    color: var(--ink-500);
    margin-top: 4px;
}
/* Score rank badge — gradient + glow */
.score-rank {
    display: inline-block;
    background: var(--gradient-teal-gold);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    margin-top: 8px;
    box-shadow: 0 2px 12px rgba(31, 147, 153, 0.2);
    letter-spacing: 0.05em;
}

/* ============================================================
   RESEARCH NOTES (B+D+E Expert Commentary) — Enhanced
   ============================================================ */
.research-notes {
    max-width: 800px;
    margin: 48px auto;
    padding: 0 20px;
}
.research-notes h2 {
    font-family: 'Noto Serif JP', serif;
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--ink-800);
}
.research-note {
    background: var(--white);
    border: 1px solid var(--ink-100);
    /* Gradient left border */
    border-left: 3px solid transparent;
    border-image: linear-gradient(180deg, var(--accent), var(--teal-500)) 1;
    border-image-slice: 0 0 0 1;
    border-radius: 0 8px 8px 0;
    padding: 24px 28px;
    margin-bottom: 20px;
    transition: box-shadow var(--duration-normal);
}
.research-note:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.research-note-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-500);
}
/* Author avatar placeholder — gradient background */
.research-note-header::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background: var(--gradient-teal-gold);
    border-radius: 50%;
    flex-shrink: 0;
}
.research-note-finding {
    font-size: 12px;
    color: var(--ink-400);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.research-note-body {
    font-size: 14px;
    line-height: 1.85;
    color: var(--ink-700);
}
/* Note labels — glass pill styling */
.research-note-body .note-label {
    display: inline-block;
    font-weight: 700;
    font-size: 11px;
    color: var(--teal-700);
    background: rgba(212, 240, 238, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 4px;
    vertical-align: middle;
    border: 1px solid rgba(31, 147, 153, 0.1);
}
.research-note-body p {
    margin: 0 0 10px;
}
.research-note-body p:last-child {
    margin-bottom: 0;
}
@media (max-width: 768px) {
    .research-note {
        padding: 18px 16px;
    }
}

/* ============================================================
   ACCESSIBILITY — Enhanced focus + a11y
   ============================================================ */
:focus-visible {
    outline: 2px solid var(--teal-500);
    outline-offset: 3px;
    border-radius: 4px;
    box-shadow: 0 0 0 4px rgba(31, 147, 153, 0.15);
}

/* High contrast mode */
@media (forced-colors: active) {
    .card, .kpi-card, .summary-card, .result-section {
        border: 2px solid CanvasText;
    }
    .finding-number, .score-rank, .filter-btn.active, .nav-cta {
        forced-color-adjust: none;
    }
}

/* Reduced motion — kill all animations */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .nav-cta::after {
        animation: none;
    }
    .hero::before {
        animation: none;
    }
    .hero-badge {
        animation: none;
    }
    .footer::before {
        animation: none;
    }
}

/* ============================================================
   HAMBURGER (hidden on desktop)
   ============================================================ */
.hamburger-toggle { display: none; }
.hamburger-label { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .header-inner { padding: 0 16px; }
    .header-nav { gap: 16px; }
    .hero h1 { font-size: 24px; }
    .content { padding: 32px 16px; }
    .kpi-grid { grid-template-columns: 1fr; }
    .grid { grid-template-columns: repeat(2, 1fr); }
    .survey-grid { grid-template-columns: 1fr; }
    .hero { padding: 48px 16px; }
    .footer-columns { grid-template-columns: 1fr 1fr; gap: 32px; }

    /* Reduce glass effects on mobile for performance */
    .card,
    .kpi-card,
    .result-section {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: var(--white);
        border-color: var(--ink-100);
    }
}

@media (max-width: 480px) {
    .grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 22px; }

    /* Hamburger menu (CSS only, checkbox hack) */
    .hamburger-toggle { display: none; }
    .hamburger-label {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        cursor: pointer;
        z-index: 102;
        position: relative;
    }
    .hamburger-label span,
    .hamburger-label span::before,
    .hamburger-label span::after {
        display: block;
        width: 20px;
        height: 2px;
        background: var(--ink-700);
        border-radius: 1px;
        transition: all 0.35s var(--ease-out-expo);
        position: relative;
    }
    .hamburger-label span::before,
    .hamburger-label span::after {
        content: '';
        position: absolute;
        left: 0;
        width: 20px;
    }
    .hamburger-label span::before { top: -6px; }
    .hamburger-label span::after { top: 6px; }

    .hamburger-toggle:checked + .hamburger-label span {
        background: transparent;
    }
    .hamburger-toggle:checked + .hamburger-label span::before {
        top: 0;
        transform: rotate(45deg);
        background: var(--ink-800);
    }
    .hamburger-toggle:checked + .hamburger-label span::after {
        top: 0;
        transform: rotate(-45deg);
        background: var(--ink-800);
    }

    .header-nav {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 32px;
        z-index: 101;
        opacity: 0;
        pointer-events: none;
        transform: scale(0.98);
        transition: opacity 0.35s var(--ease-out-expo),
                    transform 0.35s var(--ease-out-expo);
    }
    .hamburger-toggle:checked ~ .header-nav {
        opacity: 1;
        pointer-events: auto;
        transform: scale(1);
    }
    .header-nav a {
        font-size: 18px !important;
        font-weight: 600;
    }
    .header-nav a:not(.nav-cta)::after { display: none; }
    .footer-columns { grid-template-columns: 1fr; }

    /* Toast repositioned for mobile */
    .toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

/* Glass morphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Gradient text */
.gradient-text {
    background: var(--gradient-teal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gradient-text--gold {
    background: var(--gradient-teal-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtle outer glow */
.glow {
    box-shadow: 0 0 24px rgba(31, 147, 153, 0.12);
}
.glow--gold {
    box-shadow: 0 0 24px rgba(197, 165, 90, 0.12);
}

/* Entrance animation */
.animate-in {
    animation: animateIn var(--duration-entrance) var(--ease-out-expo) both;
}
@keyframes animateIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dot pattern background */
.dot-pattern {
    position: relative;
}
.dot-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--ink-100) 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    opacity: 0.5;
    pointer-events: none;
    border-radius: inherit;
}

/* Animated gradient border */
.gradient-border {
    position: relative;
    overflow: hidden;
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--teal-400), var(--accent), var(--teal-400));
    background-size: 200% 200%;
    animation: gradientBorderMove 4s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
@keyframes gradientBorderMove {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Fade-in stagger for lists */
.stagger-children > * {
    opacity: 0;
    animation: animateIn var(--duration-entrance) var(--ease-out-expo) both;
}
.stagger-children > *:nth-child(1) { animation-delay: 0ms; }
.stagger-children > *:nth-child(2) { animation-delay: 60ms; }
.stagger-children > *:nth-child(3) { animation-delay: 120ms; }
.stagger-children > *:nth-child(4) { animation-delay: 180ms; }
.stagger-children > *:nth-child(5) { animation-delay: 240ms; }
.stagger-children > *:nth-child(6) { animation-delay: 300ms; }
.stagger-children > *:nth-child(7) { animation-delay: 360ms; }
.stagger-children > *:nth-child(8) { animation-delay: 420ms; }

/* Shimmer loading placeholder */
.shimmer {
    background: linear-gradient(90deg, var(--ink-50) 25%, var(--ink-100) 50%, var(--ink-50) 75%);
    background-size: 200% 100%;
    animation: shimmerLoad 1.5s ease infinite;
}
@keyframes shimmerLoad {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Divider with label */
.divider-label {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 40px 0;
    font-size: 12px;
    color: var(--ink-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}
.divider-label::before,
.divider-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ink-100), transparent);
}

/* Visually hidden (for screen readers) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
