/* ══════════════════════════════════════════════════════════════════
   VARTOVII TRUST INTELLIGENCE DASHBOARD — STYLESHEET
   Evidence-led operator console
   ══════════════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ─── */
:root {
    /* Core palette */
    --bg-deep:    #080d12;
    --bg-panel:   #0d151c;
    --bg-card:    rgba(13, 21, 28, 0.86);
    --bg-card-solid: #111a22;
    --glass-border: rgba(230, 220, 190, 0.09);
    --glass-border-hover: rgba(230, 220, 190, 0.18);
    --glass-blur: 14px;

    /* Gradient primaries */
    --cyan:       #7ecdc3;
    --blue:       #8fb6c8;
    --gold:       #d6b56d;
    --gradient-primary: linear-gradient(135deg, #d6b56d 0%, #7ecdc3 100%);

    /* Accent palette */
    --green:      #70b783;
    --orange:     #c7864b;
    --purple:     #9f8ac7;
    --red:        #d46a59;
    --yellow:     #d6b56d;

    /* Text */
    --text-primary:   rgba(246, 241, 226, 0.94);
    --text-secondary: rgba(218, 210, 192, 0.66);
    --text-muted:     rgba(218, 210, 192, 0.4);

    /* Typography */
    --font-display: 'Outfit', system-ui, sans-serif;
    --font-body:    'Inter', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, monospace;

    /* Spacing */
    --section-gap: 5rem;
    --container-max: 1360px;
    --header-h: 64px;

    /* Animation */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1.5rem);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background:
        linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
        radial-gradient(1200px 700px at 50% -180px, rgba(214,181,109,0.12), transparent 58%),
        var(--bg-deep);
    background-size: 32px 32px, 32px 32px, auto, auto;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* Noise texture overlay */
.noise-overlay {
    position: fixed; inset: 0;
    z-index: 0; pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
}

/* ─── Utility ─── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Glass panel base */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.glass-panel:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

/* Section eyebrow */
.section-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.5rem;
}
.eyebrow-dot {
    width: 8px; height: 8px;
    background: var(--gold);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px rgba(214,181,109,0.45);
}

.section-heading-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin: -0.7rem 0 1.5rem;
}
.section-heading-row h2 {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2vw, 2rem);
    line-height: 1.05;
    letter-spacing: 0;
    color: var(--text-primary);
}
.section-heading-row p {
    max-width: 680px;
    margin-top: 0.45rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.section-meta {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
}
.eyebrow-dot--pulse {
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(1.4); }
}

/* Loader dots */
.loader-dots { display: flex; gap: 6px; justify-content: center; padding: 1rem; }
.loader-dots span {
    width: 8px; height: 8px;
    background: var(--cyan);
    border-radius: 50%;
    animation: bounce-dot 1.4s ease-in-out infinite;
}
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce-dot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
    40%           { transform: scale(1);   opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════
   1. HEADER
   ══════════════════════════════════════════════════════════════════ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(8, 13, 18, 0.86);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    transition: background 0.3s ease;
}
.header__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.header__logo {
    display: flex; align-items: center; gap: 0.6rem;
    text-decoration: none; flex-shrink: 0;
}
.header__logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(214,181,109,0.28);
    border-radius: 8px;
    color: var(--gold);
    background: rgba(214,181,109,0.08);
}
.header__logo-icon svg {
    width: 20px;
    height: 20px;
}
.header__logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.header__brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.header__tagline {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Nav */
.header__nav {
    display: flex; gap: 0.25rem;
    margin-left: auto;
}
.header__link {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.header__link:hover, .header__link--active {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}
.header__link--active {
    color: var(--gold);
}

/* Status indicator */
.header__right {
    display: flex; align-items: center; gap: 1rem;
    flex-shrink: 0;
}
.header__status {
    display: flex; align-items: center; gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
}
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-dot--connecting {
    background: var(--yellow);
    animation: pulse-dot 1.5s ease-in-out infinite;
}
.status-dot--live {
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: pulse-dot 2s ease-in-out infinite;
}
.status-dot--warning {
    background: var(--yellow);
    box-shadow: 0 0 8px var(--yellow);
}
.status-dot--error {
    background: var(--red);
}
.status-label { white-space: nowrap; }

/* Tech badges in header */
.header__badges {
    display: flex; gap: 0.35rem;
}
.tech-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(126,205,195, 0.08);
    color: var(--cyan);
    border: 1px solid rgba(126,205,195, 0.18);
    white-space: nowrap;
}
.tech-badge--purple { background: rgba(159,138,199,0.08); color: var(--purple); border-color: rgba(159,138,199,0.18); }
.tech-badge--green  { background: rgba(112,183,131,0.08); color: var(--green);  border-color: rgba(112,183,131,0.18); }
.tech-badge--orange { background: rgba(199,134,75,0.08);  color: var(--orange); border-color: rgba(199,134,75,0.18); }

/* Burger menu (mobile) */
.header__burger {
    display: none;
    flex-direction: column; gap: 4px;
    background: none; border: none; cursor: pointer;
    padding: 4px;
}
.header__burger span {
    width: 20px; height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* ══════════════════════════════════════════════════════════════════
   2. OPERATOR CONSOLE HERO
   ══════════════════════════════════════════════════════════════════ */
.hero-section {
    padding-top: calc(var(--header-h) + 3rem);
    padding-bottom: 2.75rem;
    position: relative;
    z-index: 1;
}
.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.75fr);
    gap: 2rem;
    align-items: stretch;
}
.hero-copy {
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0;
}
.hero-copy h1 {
    max-width: 820px;
    font-family: var(--font-display);
    font-size: clamp(2.7rem, 6vw, 5.8rem);
    line-height: 0.94;
    letter-spacing: 0;
    color: var(--text-primary);
}
.hero-copy__lead {
    max-width: 680px;
    margin-top: 1.25rem;
    color: var(--text-secondary);
    font-size: clamp(1rem, 1.25vw, 1.15rem);
    line-height: 1.7;
}
.hero-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 1.8rem;
}
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.action-btn:hover { transform: translateY(-1px); }
.action-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.action-btn--primary {
    background: var(--gold);
    color: #12100a;
    border: 1px solid rgba(214,181,109,0.48);
}
.action-btn--secondary {
    background: rgba(246,241,226,0.04);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}
.action-btn--secondary:hover {
    border-color: var(--glass-border-hover);
    background: rgba(246,241,226,0.07);
}
.hero-proof-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 2rem;
}
.hero-proof-strip span {
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    color: var(--text-secondary);
    background: rgba(246,241,226,0.03);
    padding: 0.38rem 0.7rem;
    font-size: 0.76rem;
}
.hero-proof-strip strong {
    color: var(--gold);
    font-family: var(--font-mono);
}
.judge-scorecard {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    max-width: 800px;
    margin-top: 1rem;
}
.judge-scorecard__item {
    min-height: 82px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(246,241,226,0.026);
    padding: 0.75rem;
}
.judge-scorecard__item span {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.45rem;
}
.judge-scorecard__item strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.82rem;
    line-height: 1.35;
}
.command-brief {
    align-self: center;
    padding: 1.25rem;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background:
        linear-gradient(180deg, rgba(214,181,109,0.08), transparent 34%),
        var(--bg-card);
}
.command-brief__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--glass-border);
}
.command-brief__label,
.mcp-proof__tag {
    display: block;
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.command-brief h2 {
    margin-top: 0.2rem;
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1;
}
.source-pill {
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid rgba(214,181,109,0.24);
    background: rgba(214,181,109,0.08);
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 0.32rem 0.62rem;
}
.verdict-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid rgba(212,106,89,0.22);
    border-radius: 8px;
    background: rgba(212,106,89,0.08);
}
.verdict-card__score {
    font-family: var(--font-mono);
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--red);
}
.verdict-card__body p {
    margin-top: 0.55rem;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.55;
}
.runtime-proof-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}
.runtime-proof {
    border: 1px solid rgba(126,205,195,0.18);
    border-radius: 8px;
    background: rgba(126,205,195,0.045);
    padding: 0.75rem;
    min-width: 0;
}
.runtime-proof span {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
}
.runtime-proof a,
.runtime-proof strong {
    display: block;
    color: var(--cyan);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
}
.runtime-proof a:hover { text-decoration: underline; }
.runtime-proof small {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.agent-flow {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.agent-flow__step {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.8rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(246,241,226,0.025);
}
.agent-flow__step--active {
    border-color: rgba(126,205,195,0.28);
    background: rgba(126,205,195,0.06);
}
.agent-flow__step span {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--gold);
    background: rgba(214,181,109,0.09);
    border: 1px solid rgba(214,181,109,0.2);
}
.agent-flow__step strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.86rem;
}
.agent-flow__step small {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-secondary);
    font-size: 0.74rem;
    line-height: 1.45;
}
.mcp-proof {
    margin-top: auto;
    border: 1px solid rgba(159,138,199,0.22);
    border-radius: 8px;
    background: rgba(159,138,199,0.06);
    padding: 0.9rem;
}
.mcp-proof p {
    margin-top: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.55;
}

/* ══════════════════════════════════════════════════════════════════
   3. STATS SECTION
   ══════════════════════════════════════════════════════════════════ */
.stats-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
    position: relative;
    z-index: 1;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}
.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.35s var(--ease-out-expo), border-color 0.35s, box-shadow 0.35s;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(214,181,109,0.045), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.stat-card:hover::before { opacity: 1; }

.stat-card__icon {
    width: 40px; height: 40px;
    margin: 0 auto 0.6rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
}
.stat-card__icon svg {
    width: 22px; height: 22px;
}
.stat-card__icon--cyan   { background: rgba(126,205,195,0.1); color: var(--cyan); }
.stat-card__icon--orange { background: rgba(199,134,75,0.1);  color: var(--orange); }
.stat-card__icon--yellow { background: rgba(214,181,109,0.1); color: var(--yellow); }
.stat-card__icon--purple { background: rgba(159,138,199,0.1); color: var(--purple); }
.stat-card__icon--red    { background: rgba(212,106,89,0.1);  color: var(--red); }
.stat-card__icon--green  { background: rgba(112,183,131,0.1); color: var(--green); }

.stat-card__value {
    font-family: var(--font-mono);
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.2;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}
.stat-card__label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Score color overrides */
.stat-card__value--green { background: linear-gradient(135deg, #70b783, #9bd0a8); -webkit-background-clip: text; background-clip: text; }
.stat-card__value--yellow { background: linear-gradient(135deg, #d6b56d, #ead08b); -webkit-background-clip: text; background-clip: text; }
.stat-card__value--orange { background: linear-gradient(135deg, #c7864b, #d9a26a); -webkit-background-clip: text; background-clip: text; }
.stat-card__value--red { background: linear-gradient(135deg, #d46a59, #e09183); -webkit-background-clip: text; background-clip: text; }

/* Trust gauge */
.trust-gauge {
    --score: 0;
    --gauge-color: var(--gold);
    width: 128px;
    height: 128px;
    position: relative;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.trust-gauge--hero {
    width: 112px;
    height: 112px;
}
.trust-gauge svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.trust-gauge__track,
.trust-gauge__progress {
    fill: none;
    stroke-width: 10;
}
.trust-gauge__track {
    stroke: rgba(255,255,255,0.055);
}
.trust-gauge__progress {
    stroke: var(--gauge-color);
    stroke-linecap: round;
    stroke-dasharray: 301.59;
    stroke-dashoffset: calc(301.59 - (301.59 * var(--score) / 100));
    filter: drop-shadow(0 0 8px var(--gauge-color));
    transition: stroke-dashoffset 1.1s var(--ease-out-expo);
}
.trust-gauge__value {
    text-align: center;
    line-height: 1;
}
.trust-gauge__value strong {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.7rem;
    color: var(--text-primary);
}
.trust-gauge__value span {
    display: block;
    margin-top: 0.25rem;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Risk distribution bar */
.riskmeter-container {
    margin-top: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}
.riskmeter-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}
.riskmeter-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.riskmeter-summary {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--gold);
    text-align: right;
}
.riskmeter {
    display: flex;
    height: 10px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
}
.riskmeter__segment {
    height: 100%;
    position: relative;
    transition: width 1s var(--ease-out-expo);
    min-width: 0;
}
.riskmeter__segment--critical { background: var(--red); }
.riskmeter__segment--high     { background: var(--orange); }
.riskmeter__segment--medium   { background: var(--yellow); }
.riskmeter__segment--low      { background: var(--green); }

.riskmeter__tooltip {
    position: absolute;
    top: -28px; left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    white-space: nowrap;
    background: var(--bg-card-solid);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-primary);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.riskmeter__segment:hover .riskmeter__tooltip { opacity: 1; }

.risk-legend {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
}
.risk-legend__item {
    display: flex; align-items: center; gap: 0.3rem;
}
.risk-legend__dot {
    width: 8px; height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════
   4. SUBMISSION EVIDENCE
   ══════════════════════════════════════════════════════════════════ */
.evidence-section {
    padding: 3rem 0 var(--section-gap);
    position: relative;
    z-index: 1;
}
.proof-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.proof-card {
    min-height: 190px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: var(--bg-card);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.proof-card--ready {
    background:
        linear-gradient(180deg, rgba(126,205,195,0.055), transparent 64%),
        var(--bg-card);
}
.proof-card__status {
    width: fit-content;
    border-radius: 999px;
    border: 1px solid rgba(112,183,131,0.24);
    background: rgba(112,183,131,0.08);
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    padding: 0.22rem 0.5rem;
}
.proof-card h3 {
    font-family: var(--font-display);
    font-size: 1.12rem;
    line-height: 1.1;
    color: var(--text-primary);
}
.proof-card p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.55;
}

/* ══════════════════════════════════════════════════════════════════
   5. LIVE EVIDENCE PROOF
   ══════════════════════════════════════════════════════════════════ */
.live-proof-section {
    padding: 0 0 var(--section-gap);
    position: relative;
    z-index: 1;
}
.live-proof-panel {
    padding: 1.25rem;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}
.live-proof-score,
.live-proof-market,
.live-proof-breakdown,
.live-proof-trace,
.live-proof-pipeline {
    min-width: 0;
}
.live-proof-score {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border: 1px solid rgba(214,181,109,0.14);
    border-radius: 8px;
    background: rgba(214,181,109,0.04);
    padding: 1rem;
}
.live-proof-score__caption {
    text-align: center;
}
.live-proof-score__caption strong {
    display: block;
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 1rem;
}
.live-proof-score__caption span {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.live-proof-market {
    grid-column: span 4;
    border: 1px solid rgba(126,205,195,0.14);
    border-radius: 8px;
    background: rgba(126,205,195,0.035);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.live-proof-market__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}
.live-proof-market__header strong {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.08rem;
    line-height: 1.1;
}
.live-proof-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}
.live-proof-metrics div,
.live-factor,
.source-ledger div {
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255,255,255,0.025);
    padding: 0.75rem;
}
.live-proof-metrics span,
.live-factor span,
.source-ledger span {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.live-proof-metrics strong,
.live-factor strong,
.source-ledger strong {
    display: block;
    margin-top: 0.28rem;
    color: var(--text-primary);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}
.live-proof-persistence {
    border-top: 1px solid var(--glass-border);
    padding-top: 0.75rem;
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 0.65rem;
}
.live-proof-breakdown,
.live-proof-trace {
    grid-column: span 3;
    display: grid;
    gap: 0.55rem;
    align-content: start;
}
.live-panel-title,
.pipeline-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid rgba(214,181,109,0.14);
    border-radius: 8px;
    background: rgba(214,181,109,0.045);
    padding: 0.58rem 0.7rem;
}
.live-panel-title span,
.pipeline-title span {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.live-panel-title strong,
.pipeline-title strong {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    text-align: right;
    overflow-wrap: anywhere;
}
.live-factor small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.7rem;
    line-height: 1.35;
}
.live-trace-step {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 0.65rem;
    border: 1px solid rgba(112,183,131,0.13);
    border-radius: 8px;
    background: rgba(112,183,131,0.03);
    padding: 0.65rem;
}
.live-trace-step > span {
    width: 30px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(112,183,131,0.18);
    border-radius: 7px;
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 700;
}
.live-trace-step strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.76rem;
}
.live-trace-step p {
    margin-top: 0.1rem;
    color: var(--text-secondary);
    font-size: 0.7rem;
    line-height: 1.35;
}
.live-trace-step small {
    display: block;
    margin-top: 0.22rem;
    color: var(--text-muted);
    font-size: 0.66rem;
    line-height: 1.35;
}
.live-proof-signal {
    border: 1px solid rgba(199,134,75,0.18);
    border-radius: 8px;
    background: rgba(199,134,75,0.035);
    padding: 0.8rem;
}
.live-proof-signal__pending {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.66rem;
}
.signal-chart__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}
.signal-chart__header span {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.signal-chart__header strong {
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.92rem;
}
.signal-chart--stress .signal-chart__header strong { color: var(--orange); }
.signal-chart--positive .signal-chart__header strong { color: var(--green); }
.signal-chart__track {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background:
        linear-gradient(90deg,
            rgba(212,106,89,0.42) 0%,
            rgba(199,134,75,0.22) 35%,
            rgba(214,181,109,0.28) 50%,
            rgba(112,183,131,0.34) 100%);
    border: 1px solid rgba(246,241,226,0.08);
}
.signal-chart__zero {
    position: absolute;
    top: -5px;
    bottom: -5px;
    left: 50%;
    width: 1px;
    background: rgba(246,241,226,0.44);
}
.signal-chart__marker {
    position: absolute;
    top: 50%;
    left: var(--marker, 50%);
    width: 16px;
    height: 16px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--text-primary);
    border: 3px solid var(--bg-card-solid);
    box-shadow: 0 0 0 1px rgba(246,241,226,0.18), 0 6px 18px rgba(0,0,0,0.3);
}
.signal-chart__scale {
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.56rem;
}
.signal-chart p {
    margin-top: 0.65rem;
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.45;
}
.source-ledger {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}
.source-ledger div {
    padding: 0.6rem;
}
.source-ledger strong {
    font-size: 0.7rem;
}
.live-proof-pipeline {
    grid-column: 1 / -1;
    border: 1px solid rgba(159,138,199,0.16);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(159,138,199,0.08), rgba(126,205,195,0.045)),
        rgba(255,255,255,0.018);
    padding: 0.9rem;
}
.pipeline-rail {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.pipeline-rail::before {
    content: '';
    position: absolute;
    top: calc(0.75rem + 17px);
    left: 7%;
    right: 7%;
    height: 1px;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(214,181,109,0.38), rgba(126,205,195,0.32), rgba(159,138,199,0.3));
}
.pipeline-step {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 0.65rem;
    align-items: start;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: var(--bg-card-solid);
    padding: 0.75rem;
    min-width: 0;
}
.pipeline-step__num {
    position: relative;
    z-index: 1;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(214,181,109,0.24);
    background: rgba(214,181,109,0.1);
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
}
.pipeline-step strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.78rem;
}
.pipeline-step p {
    margin-top: 0.16rem;
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.35;
}
.pipeline-step small {
    display: inline-block;
    margin-top: 0.38rem;
    border: 1px solid rgba(126,205,195,0.18);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(126,205,195,0.06);
    padding: 0.12rem 0.42rem;
    font-family: var(--font-mono);
    font-size: 0.56rem;
}

.proof-ops-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 0.95fr);
    gap: 1rem;
    margin-top: 1rem;
}
.proof-ops-card {
    min-width: 0;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(246,241,226,0.035), transparent 42%),
        var(--bg-card);
    padding: 1rem;
}
.proof-ops-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.85rem;
}
.proof-ops-card__header h3 {
    margin-top: 0.18rem;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.05rem;
    line-height: 1.1;
}
.wallet-proof-balance {
    border: 1px solid rgba(112,183,131,0.2);
    border-radius: 8px;
    background: rgba(112,183,131,0.055);
    padding: 0.9rem;
    margin-bottom: 0.75rem;
}
.wallet-proof-balance span,
.wallet-proof-grid span,
.wallet-factor span {
    display: block;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.wallet-proof-balance strong {
    display: block;
    margin-top: 0.32rem;
    color: var(--green);
    font-family: var(--font-mono);
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
}
.wallet-proof-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}
.wallet-proof-grid div,
.wallet-factor {
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255,255,255,0.025);
    padding: 0.7rem;
    min-width: 0;
}
.wallet-proof-grid strong,
.wallet-factor strong {
    display: block;
    margin-top: 0.26rem;
    color: var(--text-primary);
    font-size: 0.78rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.wallet-proof-factors {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.65rem;
}
.wallet-factor small {
    display: block;
    margin-top: 0.24rem;
    color: var(--text-secondary);
    font-size: 0.68rem;
    line-height: 1.35;
}
.agent-activity-stream {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 430px;
    overflow-y: auto;
    padding-right: 0.1rem;
}
.activity-event {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 0.65rem;
    border: 1px solid rgba(126,205,195,0.13);
    border-radius: 8px;
    background: rgba(126,205,195,0.03);
    padding: 0.68rem;
}
.activity-event--active {
    border-color: rgba(214,181,109,0.22);
    background: rgba(214,181,109,0.045);
}
.activity-event__icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(126,205,195,0.2);
    border-radius: 8px;
    color: var(--cyan);
    background: rgba(126,205,195,0.07);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
}
.activity-event__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}
.activity-event__top strong {
    color: var(--text-primary);
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}
.activity-event__top span,
.activity-event small {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    white-space: nowrap;
}
.activity-event p {
    margin-top: 0.18rem;
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.4;
}
.activity-empty {
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.78rem;
    padding: 1rem;
    text-align: center;
}
.trust-radar-card {
    display: flex;
    flex-direction: column;
}
.trust-radar-chart {
    display: grid;
    place-items: center;
    min-height: 280px;
}
.radar-svg {
    width: min(100%, 300px);
    height: auto;
    overflow: visible;
}
.radar-ring {
    fill: none;
    stroke: rgba(246,241,226,0.09);
    stroke-width: 1;
}
.radar-axis {
    stroke: rgba(246,241,226,0.12);
    stroke-width: 1;
}
.radar-area {
    fill: rgba(126,205,195,0.22);
    stroke: none;
}
.radar-line {
    fill: none;
    stroke: var(--cyan);
    stroke-width: 2;
    filter: drop-shadow(0 0 10px rgba(126,205,195,0.22));
}
.radar-point {
    fill: var(--gold);
    stroke: var(--bg-card-solid);
    stroke-width: 2;
}
.radar-label {
    fill: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0;
}
.trust-radar-legend {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.42rem;
}
.trust-radar-legend__item {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255,255,255,0.025);
    padding: 0.46rem 0.58rem;
}
.trust-radar-legend__item span {
    color: var(--text-secondary);
    font-size: 0.72rem;
}
.trust-radar-legend__item strong {
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.74rem;
}

/* ══════════════════════════════════════════════════════════════════
   6. CHAT SECTION
   ══════════════════════════════════════════════════════════════════ */
.chat-section {
    padding: 0 0 var(--section-gap);
    position: relative;
    z-index: 1;
}
.chat-panel {
    display: flex;
    flex-direction: column;
    height: 620px;
    overflow: hidden;
}

/* Messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Welcome card */
.chat-welcome {
    text-align: center;
    padding: 2.5rem 1.5rem;
    margin: auto 0;
}
.chat-welcome__icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 1rem;
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(214,181,109,0.24);
    border-radius: 8px;
    background: rgba(214,181,109,0.07);
    margin-bottom: 1rem;
}
.chat-welcome__icon svg {
    width: 30px;
    height: 30px;
}
@keyframes float-up-down {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.chat-welcome h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}
.chat-welcome p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    max-width: 500px;
    margin: 0 auto;
}
.demo-path {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 1rem;
}
.demo-path span {
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: rgba(246,241,226,0.03);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    padding: 0.25rem 0.5rem;
}

/* Message bubbles */
.chat-msg {
    display: flex;
    gap: 0.75rem;
    max-width: 85%;
    animation: msg-in 0.4s var(--ease-out-expo);
}
@keyframes msg-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.chat-msg--user {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.chat-msg__avatar {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    flex-shrink: 0;
}
.chat-msg--agent .chat-msg__avatar {
    background: rgba(126,205,195,0.1);
    border: 1px solid rgba(126,205,195,0.22);
    color: var(--cyan);
}
.chat-msg--user .chat-msg__avatar {
    background: rgba(214,181,109,0.1);
    border: 1px solid rgba(214,181,109,0.22);
    color: var(--gold);
}
.chat-msg__bubble {
    padding: 0.85rem 1.1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.65;
}
.chat-msg--agent .chat-msg__bubble {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    border-top-left-radius: 4px;
}
.chat-msg--user .chat-msg__bubble {
    background: linear-gradient(135deg, rgba(214,181,109,0.13), rgba(126,205,195,0.08));
    border: 1px solid rgba(214,181,109,0.18);
    border-top-right-radius: 4px;
    color: var(--text-primary);
}

/* Markdown inside agent messages */
.chat-msg__bubble strong { color: var(--cyan); font-weight: 600; }
.chat-msg__bubble em { color: var(--text-secondary); font-style: italic; }
.chat-msg__bubble code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    background: rgba(255,255,255,0.06);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}
.chat-msg__bubble pre {
    background: rgba(0,0,0,0.3);
    padding: 0.75rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0.5rem 0;
}
.chat-msg__bubble pre code {
    background: none;
    padding: 0;
}
.chat-msg__bubble ul, .chat-msg__bubble ol {
    padding-left: 1.2rem;
    margin: 0.4rem 0;
}
.chat-msg__bubble li {
    margin-bottom: 0.2rem;
}
.chat-msg__bubble li::marker {
    color: var(--cyan);
}
.chat-msg__bubble h1, .chat-msg__bubble h2, .chat-msg__bubble h3,
.chat-msg__bubble h4, .chat-msg__bubble h5, .chat-msg__bubble h6 {
    font-family: var(--font-display);
    margin: 0.6rem 0 0.3rem;
    color: var(--text-primary);
}
.chat-msg__bubble h3 { font-size: 1rem; }
.chat-msg__bubble h4 { font-size: 0.9rem; }
.chat-msg__bubble p { margin: 0.3rem 0; }
.chat-msg__bubble p:first-child { margin-top: 0; }
.chat-msg__bubble p:last-child { margin-bottom: 0; }

/* Agent name label */
.chat-msg__agent-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
    opacity: 0.7;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0 1.5rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.typing-indicator[hidden] {
    display: none;
}
.typing-indicator__avatar {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(126,205,195,0.22);
    border-radius: 8px;
    background: rgba(126,205,195,0.08);
    color: var(--cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
}
.typing-indicator__body {
    width: min(620px, 100%);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255,255,255,0.035);
    padding: 0.7rem 0.8rem;
}
.typing-indicator__headline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.typing-indicator__dots {
    display: flex; gap: 3px;
}
.typing-indicator__dots span {
    width: 6px; height: 6px;
    background: var(--gold);
    border-radius: 50%;
    animation: bounce-dot 1.4s ease-in-out infinite;
}
.typing-indicator__dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator__dots span:nth-child(3) { animation-delay: 0.3s; }
.typing-indicator__text {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
}
.typing-progress {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.65rem;
}
.typing-progress__step {
    min-width: 0;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    background: rgba(8,13,18,0.34);
    padding: 0.48rem 0.52rem;
    transition: border-color 0.24s ease, background 0.24s ease, opacity 0.24s ease;
}
.typing-progress__marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.1rem;
    margin-bottom: 0.28rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.52rem;
    line-height: 1;
}
.typing-progress__step strong,
.typing-progress__step small {
    display: block;
    overflow-wrap: anywhere;
}
.typing-progress__step strong {
    color: var(--text-secondary);
    font-size: 0.62rem;
    line-height: 1.25;
}
.typing-progress__step small {
    margin-top: 0.12rem;
    color: var(--text-muted);
    font-size: 0.56rem;
    line-height: 1.25;
}
.typing-progress__step--active {
    border-color: rgba(214,181,109,0.34);
    background: linear-gradient(135deg, rgba(214,181,109,0.12), rgba(126,205,195,0.05));
    box-shadow: 0 0 20px rgba(214,181,109,0.08);
}
.typing-progress__step--active .typing-progress__marker {
    border-color: rgba(214,181,109,0.42);
    color: var(--gold);
}
.typing-progress__step--active strong {
    color: var(--gold);
}
.typing-progress__step--done {
    border-color: rgba(126,205,195,0.2);
    background: rgba(126,205,195,0.06);
}
.typing-progress__step--done .typing-progress__marker {
    border-color: rgba(126,205,195,0.28);
    color: var(--cyan);
}
.typing-progress__step--done strong {
    color: var(--cyan);
}
.chat-msg__content--revealing::after {
    content: "";
    display: inline-block;
    width: 0.5rem;
    height: 1em;
    margin-left: 0.2rem;
    vertical-align: -0.12em;
    border-radius: 2px;
    background: var(--gold);
    animation: cursor-blink 0.9s steps(2, start) infinite;
}
@keyframes cursor-blink {
    0%, 45% { opacity: 1; }
    46%, 100% { opacity: 0; }
}

/* Quick action buttons */
.chat-quick-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--glass-border);
}
.quick-btn {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.quick-btn:hover {
    background: rgba(214,181,109,0.08);
    border-color: rgba(214,181,109,0.22);
    color: var(--gold);
    transform: translateY(-1px);
}

/* Chat input */
.chat-input-area {
    padding: 0.75rem 1.5rem 1rem;
    border-top: 1px solid var(--glass-border);
}
.chat-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    transition: border-color 0.3s;
}
.chat-input-wrapper:focus-within {
    border-color: rgba(214,181,109,0.32);
    box-shadow: 0 0 0 3px rgba(214,181,109,0.06);
}
.chat-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    resize: none;
    max-height: 120px;
    line-height: 1.5;
}
.chat-input::placeholder { color: var(--text-muted); }
.chat-send-btn {
    width: 38px; height: 38px;
    border-radius: 8px;
    border: none;
    background: var(--gradient-primary);
    color: #0a0e1a;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s, opacity 0.2s;
}
.chat-send-btn:hover { transform: scale(1.05); }
.chat-send-btn:active { transform: scale(0.95); }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-send-btn svg { width: 18px; height: 18px; }

.chat-input-hint {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    text-align: right;
}
.chat-input-hint kbd {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    padding: 1px 4px;
    border: 1px solid var(--glass-border);
    border-radius: 3px;
    background: rgba(255,255,255,0.04);
}

/* ══════════════════════════════════════════════════════════════════
   6. JUDGE EXECUTION TRACE
   ══════════════════════════════════════════════════════════════════ */
.judge-trace-section {
    padding: 0 0 var(--section-gap);
    position: relative;
    z-index: 1;
}
.judge-trace-panel {
    padding: 1.25rem;
    display: grid;
    grid-template-columns: 1.15fr 1.25fr 1fr;
    gap: 1rem;
    align-items: stretch;
}
.trace-summary,
.trace-steps,
.trace-mcp {
    min-width: 0;
}
.trace-decision {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.8rem;
    align-content: start;
    align-items: start;
    padding: 1rem;
    border: 1px solid rgba(214,181,109,0.14);
    border-radius: 8px;
    background: rgba(214,181,109,0.045);
}
.trace-decision .risk-badge {
    grid-column: 1 / -1;
    width: fit-content;
}
.trace-label {
    display: block;
    margin-bottom: 0.25rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.trace-decision h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    line-height: 1;
    color: var(--text-primary);
}
.trace-decision p {
    margin-top: 0.45rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.45;
}
.trace-score {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}
.trace-runtime {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}
.trace-runtime span,
.trace-counts span {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    padding: 0.25rem 0.5rem;
    background: rgba(255,255,255,0.025);
}
.trace-steps {
    display: grid;
    gap: 0.55rem;
}
.trace-step {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 0.7rem;
    padding: 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(126,205,195,0.12);
    background: rgba(126,205,195,0.035);
}
.trace-step__num {
    width: 32px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    border: 1px solid rgba(126,205,195,0.18);
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
}
.trace-step strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.78rem;
}
.trace-step span:not(.trace-step__num) {
    display: block;
    margin-top: 0.08rem;
    color: var(--text-secondary);
    font-size: 0.73rem;
}
.trace-step small {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.35;
}
.trace-mcp {
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(112,183,131,0.14);
    background: rgba(112,183,131,0.035);
}
.trace-mcp__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}
.trace-mcp__header strong {
    color: var(--text-primary);
    font-size: 0.78rem;
}
.trace-mcp p {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.45;
}
.trace-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
}
.trace-audit-sample {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--glass-border);
}
.trace-audit-sample span,
.trace-audit-sample small {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
}
.trace-audit-sample strong {
    display: block;
    margin: 0.2rem 0;
    color: var(--text-primary);
    font-size: 0.8rem;
}
.trace-error {
    color: var(--red);
    font-size: 0.8rem;
}

/* ══════════════════════════════════════════════════════════════════
   7. LEADERBOARD
   ══════════════════════════════════════════════════════════════════ */
.leaderboard-section {
    padding: 0 0 var(--section-gap);
    position: relative;
    z-index: 1;
}
.leaderboard-panel {
    padding: 1.5rem;
}

/* Tabs */
.leaderboard-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.tab-btn {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
}
.tab-btn--active {
    background: rgba(214,181,109,0.1);
    border-color: rgba(214,181,109,0.25);
    color: var(--gold);
}
.tab-btn:hover:not(.tab-btn--active) {
    background: rgba(255,255,255,0.04);
}

.leaderboard-refresh {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}
.refresh-timer {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
}
.refresh-btn {
    width: 30px; height: 30px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.refresh-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}
.refresh-btn svg { width: 14px; height: 14px; }
.refresh-btn.spinning svg { animation: spin 0.8s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Table */
.leaderboard-table-wrap { overflow-x: auto; }
.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.35rem;
}
.leaderboard-table th {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}
.th-rank { width: 50px; text-align: center; }
.th-score { width: 200px; }
.th-risk { width: 110px; }

.leaderboard-table td {
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
    vertical-align: middle;
}
.leaderboard-table tbody tr {
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
}
.leaderboard-table tbody tr:hover {
    background: rgba(214,181,109,0.045);
    transform: translateX(2px);
}

/* Rank badge */
.rank-badge {
    width: 28px; height: 28px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    margin: 0 auto;
}
.rank-badge--1 { background: linear-gradient(135deg, #d6b56d, #b99345); color: #12100a; }
.rank-badge--2 { background: linear-gradient(135deg, #aab2ad, #7d8884); color: #101417; }
.rank-badge--3 { background: linear-gradient(135deg, #c7864b, #986138); color: #fff; }
.rank-badge--default { background: rgba(255,255,255,0.06); color: var(--text-secondary); }

/* Entity name cell */
.entity-name {
    font-weight: 600;
    color: var(--text-primary);
}
.entity-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Trust score bar */
.trust-score-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.trust-score-num {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    min-width: 32px;
}
.trust-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.trust-bar__fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s var(--ease-out-expo);
}

/* Risk badge */
.risk-badge {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.risk-badge--critical { background: rgba(212,106,89,0.15);  color: var(--red);    border: 1px solid rgba(212,106,89,0.3); }
.risk-badge--high     { background: rgba(199,134,75,0.15);  color: var(--orange); border: 1px solid rgba(199,134,75,0.3); }
.risk-badge--medium   { background: rgba(214,181,109,0.15); color: var(--yellow); border: 1px solid rgba(214,181,109,0.3); }
.risk-badge--low      { background: rgba(112,183,131,0.15); color: var(--green);  border: 1px solid rgba(112,183,131,0.3); }

.leaderboard-loading td {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 2rem;
}

/* ══════════════════════════════════════════════════════════════════
   7. RISK DISTRIBUTION CARDS
   ══════════════════════════════════════════════════════════════════ */
.risk-section {
    padding-bottom: var(--section-gap);
    position: relative;
    z-index: 1;
}
.risk-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.risk-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1.25rem;
    transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s, border-color 0.3s;
}
.risk-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.risk-card--critical:hover { border-color: rgba(212,106,89,0.3); }
.risk-card--high:hover     { border-color: rgba(199,134,75,0.3); }
.risk-card--medium:hover   { border-color: rgba(214,181,109,0.3); }
.risk-card--low:hover      { border-color: rgba(112,183,131,0.3); }

.risk-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.risk-card__badge { font-size: 0.65rem; }
.risk-card__count {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
}
.risk-card--critical .risk-card__count { color: var(--red); }
.risk-card--high .risk-card__count     { color: var(--orange); }
.risk-card--medium .risk-card__count   { color: var(--yellow); }
.risk-card--low .risk-card__count      { color: var(--green); }

.risk-card__bar {
    height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.risk-card__fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1.2s var(--ease-out-expo);
    width: 0%;
}
.risk-card--critical .risk-card__fill { background: var(--red); }
.risk-card--high .risk-card__fill     { background: var(--orange); }
.risk-card--medium .risk-card__fill   { background: var(--yellow); }
.risk-card--low .risk-card__fill      { background: var(--green); }

.risk-card__desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ══════════════════════════════════════════════════════════════════
   8. INVESTIGATIONS TIMELINE
   ══════════════════════════════════════════════════════════════════ */
.investigations-section {
    padding-bottom: var(--section-gap);
    position: relative;
    z-index: 1;
}
.investigations-panel {
    padding: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
}
.timeline {
    position: relative;
    padding-left: 2rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold), rgba(214,181,109,0.08));
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    animation: msg-in 0.4s var(--ease-out-expo);
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 6px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--bg-deep);
    border: 2px solid var(--gold);
    z-index: 1;
}
.timeline-item--critical::before { border-color: var(--red); }
.timeline-item--high::before     { border-color: var(--orange); }
.timeline-item--medium::before   { border-color: var(--yellow); }
.timeline-item--low::before      { border-color: var(--green); }

.timeline-item__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}
.timeline-item__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
}
.timeline-item__type {
    min-width: 28px;
    height: 24px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--gold);
    border: 1px solid rgba(214,181,109,0.22);
    background: rgba(214,181,109,0.07);
}
.timeline-item__score {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
}
.timeline-item__summary {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 0.3rem;
}
.timeline-item__time {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.timeline-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}
.timeline-empty__icon {
    width: 40px; height: 40px;
    margin: 0 auto 0.5rem;
    color: var(--text-muted);
}
.timeline-empty p {
    font-size: 0.82rem;
}

/* ══════════════════════════════════════════════════════════════════
   9. ARCHITECTURE
   ══════════════════════════════════════════════════════════════════ */
.arch-section {
    padding-bottom: var(--section-gap);
    position: relative;
    z-index: 1;
}
.arch-panel {
    padding: 2rem;
}
.arch-svg-wrap {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}
.arch-diagram {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: block;
}
.arch-node rect {
    transition: filter 0.3s;
}
.arch-node:hover rect {
    filter: brightness(1.2);
}

.arch-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}
.arch-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: all 0.2s;
}
.arch-badge:hover {
    background: rgba(214,181,109,0.06);
    border-color: rgba(214,181,109,0.2);
    color: var(--gold);
}

/* ══════════════════════════════════════════════════════════════════
   10. AUDIT LOG
   ══════════════════════════════════════════════════════════════════ */
.audit-section {
    padding-bottom: var(--section-gap);
    position: relative;
    z-index: 1;
}
.audit-panel {
    padding: 1rem 1.25rem;
    max-height: 350px;
    overflow-y: auto;
}
.audit-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.audit-entry {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    transition: background 0.2s;
    font-size: 0.78rem;
    animation: msg-in 0.3s var(--ease-out-expo);
}
.audit-entry:hover { background: rgba(255,255,255,0.04); }
.audit-entry__icon {
    width: 28px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(126,205,195,0.18);
    border-radius: 6px;
    background: rgba(126,205,195,0.06);
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    flex-shrink: 0;
}
.audit-entry__agent {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--gold);
    font-size: 0.72rem;
    min-width: 100px;
}
.audit-entry__action {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.75rem;
}
.audit-entry__model {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}
.audit-entry__time {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.audit-loading {
    padding: 1rem;
    text-align: center;
}

/* ══════════════════════════════════════════════════════════════════
   11. PRODUCT CONTEXT
   ══════════════════════════════════════════════════════════════════ */
.product-context-section {
    padding-bottom: var(--section-gap);
    position: relative;
    z-index: 1;
}
.product-context-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 2rem;
    align-items: start;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}
.product-context-copy h2 {
    max-width: 760px;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.3vw, 2.2rem);
    line-height: 1.05;
    letter-spacing: 0;
    color: var(--text-primary);
}
.product-context-copy p {
    max-width: 820px;
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}
.product-context-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}
.product-context-links a {
    min-height: 84px;
    padding: 0.8rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255,255,255,0.025);
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.product-context-links a:hover {
    border-color: rgba(214,181,109,0.24);
    background: rgba(214,181,109,0.045);
    transform: translateY(-1px);
}
.product-context-links span {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.product-context-links strong {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-primary);
    font-size: 0.82rem;
    line-height: 1.25;
}

/* ══════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════ */
.site-footer {
    border-top: 1px solid var(--glass-border);
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}
.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-align: center;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.footer-logo-icon { font-size: 1.2rem; }
.footer-brand-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.footer-tagline {
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.footer-tagline strong { color: var(--text-primary); }
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    justify-content: center;
}
.footer-links a {
    display: flex; align-items: center; gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--cyan); }
.footer-copy {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════
   ENTITY DETAIL MODAL
   ══════════════════════════════════════════════════════════════════ */
.entity-modal {
    border: none;
    background: transparent;
    padding: 0;
    max-width: 640px;
    width: 92%;
    margin: auto;
}
.entity-modal::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}
.modal-content {
    padding: 1.5rem;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}
.modal-close {
    position: absolute;
    top: 0.75rem; right: 0.75rem;
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.modal-close:hover {
    background: rgba(212,106,89,0.15);
    border-color: var(--red);
    color: var(--red);
}
.modal-body {
    font-size: 0.85rem;
    line-height: 1.65;
}
.modal-body h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.modal-body .detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.modal-body .detail-item {
    padding: 0.5rem;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}
.modal-body .detail-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.modal-body .detail-value {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9rem;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .header__badges { display: none; }
    .hero-layout {
        grid-template-columns: 1fr;
    }
    .hero-copy,
    .command-brief {
        min-height: auto;
    }
    .command-brief {
        align-self: stretch;
    }
    .proof-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .live-proof-panel {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
    .live-proof-score {
        grid-column: span 2;
    }
    .live-proof-market {
        grid-column: span 4;
    }
    .live-proof-breakdown,
    .live-proof-trace {
        grid-column: span 3;
    }
    .live-proof-pipeline {
        grid-column: 1 / -1;
    }
    .proof-ops-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .trust-radar-card {
        grid-column: 1 / -1;
    }
    .judge-scorecard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .judge-trace-panel {
        grid-template-columns: 1fr 1fr;
    }
    .trace-mcp {
        grid-column: 1 / -1;
    }
    .product-context-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .risk-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .section-heading-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }
    .judge-trace-panel {
        grid-template-columns: 1fr;
    }
    .live-proof-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .live-proof-score,
    .live-proof-market,
    .live-proof-breakdown,
    .live-proof-trace {
        grid-column: span 1;
    }
    .live-proof-trace {
        grid-column: auto;
    }
    .trace-mcp {
        grid-column: auto;
    }
    .product-context-links {
        grid-template-columns: 1fr 1fr;
    }
    .proof-ops-grid {
        grid-template-columns: 1fr;
    }
    .trust-radar-card {
        grid-column: auto;
    }
    .leaderboard-table .th-info { display: none; }
    .leaderboard-table td:nth-child(5) { display: none; }
}

@media (max-width: 768px) {
    :root {
        --section-gap: 3rem;
    }
    .header__nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0; right: 0;
        background: rgba(8,13,18,0.96);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--glass-border);
    }
    .header__nav.open { display: flex; }
    .header__burger { display: flex; }
    .header__right { margin-left: auto; }
    .header__status .status-label { display: none; }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-section {
        padding-top: calc(var(--header-h) + 1.2rem);
    }
    .hero-copy {
        padding: 1rem 0;
    }
    .hero-copy h1 {
        font-size: clamp(2.25rem, 13vw, 3.4rem);
    }
    .hero-copy__lead {
        font-size: 0.96rem;
    }
    .hero-proof-strip {
        margin-top: 1.35rem;
        gap: 0.45rem;
    }
    .judge-scorecard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }
    .judge-scorecard__item {
        min-height: 74px;
        padding: 0.65rem;
    }
    .judge-scorecard__item strong {
        font-size: 0.78rem;
    }
    .command-brief {
        padding: 1rem;
        gap: 0.75rem;
    }
    .runtime-proof-grid {
        grid-template-columns: 1fr;
    }
    .verdict-card {
        grid-template-columns: 1fr;
    }
    .proof-grid {
        grid-template-columns: 1fr;
    }
    .live-proof-panel {
        grid-template-columns: 1fr;
    }
    .live-proof-score,
    .live-proof-market,
    .live-proof-breakdown,
    .live-proof-trace,
    .live-proof-pipeline {
        grid-column: 1 / -1;
    }
    .live-proof-metrics {
        grid-template-columns: 1fr;
    }
    .source-ledger,
    .pipeline-rail {
        grid-template-columns: 1fr;
    }
    .wallet-proof-grid {
        grid-template-columns: 1fr;
    }
    .proof-ops-card__header {
        align-items: flex-start;
        flex-direction: column;
    }
    .activity-event__top {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.1rem;
    }
    .activity-event__top span,
    .activity-event small {
        white-space: normal;
    }
    .pipeline-rail::before {
        top: 0;
        bottom: 0;
        left: calc(0.75rem + 17px);
        right: auto;
        width: 1px;
        height: auto;
        background: linear-gradient(180deg, rgba(214,181,109,0.38), rgba(126,205,195,0.32), rgba(159,138,199,0.3));
    }
    .risk-cards-grid {
        grid-template-columns: 1fr 1fr;
    }
    .chat-panel {
        height: 500px;
    }
    .typing-progress {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .chat-quick-actions {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }
    .quick-btn { flex-shrink: 0; }

    .arch-diagram { min-width: 0; }

    .modal-body .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container,
    .header__inner {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .hero-actions {
        flex-direction: column;
    }
    .action-btn {
        width: 100%;
    }
    .command-brief__header {
        flex-direction: column;
    }
    .audit-entry {
        display: grid;
        grid-template-columns: 28px 1fr;
        align-items: start;
    }
    .audit-entry__agent,
    .audit-entry__action,
    .audit-entry__model,
    .audit-entry__time {
        min-width: 0;
        grid-column: 2;
        white-space: normal;
    }
    .audit-entry__icon {
        grid-row: 1 / span 4;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }
    .stat-card { padding: 1rem; }
    .stat-card__value { font-size: 1.4rem; }
    .risk-cards-grid {
        grid-template-columns: 1fr;
    }
    .riskmeter-label-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }
    .riskmeter-summary {
        text-align: left;
    }
    .product-context-links {
        grid-template-columns: 1fr;
    }
    .product-context-links a {
        min-height: 72px;
    }
    .trust-radar-chart {
        min-height: 250px;
    }
    .typing-progress {
        grid-template-columns: 1fr;
    }
    .radar-label {
        font-size: 8px;
    }
}

/* ─── Entrance Animations ─── */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.stat-card,
.risk-card,
.glass-panel {
    animation: fade-in-up 0.6s var(--ease-out-expo) both;
}
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }
.stat-card:nth-child(5) { animation-delay: 0.25s; }
.stat-card:nth-child(6) { animation-delay: 0.3s; }

.risk-card:nth-child(1) { animation-delay: 0.05s; }
.risk-card:nth-child(2) { animation-delay: 0.1s; }
.risk-card:nth-child(3) { animation-delay: 0.15s; }
.risk-card:nth-child(4) { animation-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
    .loader-dots span,
    .typing-indicator__dots span,
    .eyebrow-dot--pulse,
    .status-dot--connecting,
    .status-dot--live {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
    .trust-gauge__progress {
        transition: none !important;
    }
}
