﻿:root {
    --ink: #091115;
    --deep: #0f1b20;
    --panel: rgba(13, 24, 30, 0.78);
    --panel-strong: rgba(17, 31, 38, 0.96);
    --line: rgba(152, 176, 181, 0.22);
    --text: #f4efe2;
    --muted: #b6c3c0;
    --teal: #73cdbf;
    --brass: #c6a86d;
    --warning: #ff835e;
    --success: #91d98c;
    --pending: #8b9ea3;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at top left, rgba(115, 205, 191, 0.18), transparent 32%),
        radial-gradient(circle at 80% 20%, rgba(198, 168, 109, 0.18), transparent 28%),
        linear-gradient(180deg, #051014 0%, #091115 40%, #0d171b 100%);
    color: var(--text);
    font-family: "Space Grotesk", sans-serif;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent);
    pointer-events: none;
}

.site-shell {
    position: relative;
    overflow: hidden;
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.ambient {
    position: absolute;
    border-radius: 999px;
    filter: blur(70px);
    opacity: 0.38;
    pointer-events: none;
}

.ambient-one {
    top: 6rem;
    right: -6rem;
    width: 18rem;
    height: 18rem;
    background: rgba(115, 205, 191, 0.25);
}

.ambient-two {
    top: 28rem;
    left: -8rem;
    width: 22rem;
    height: 22rem;
    background: rgba(198, 168, 109, 0.18);
}

.hero,
.panel,
.footer {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero {
    padding: 4rem;
    border-radius: 28px;
    min-height: 24rem;
}

.eyebrow,
.section-kicker,
.metric-label,
.summary-label,
.catalog-id,
.anchor-range {
    font-family: "IBM Plex Mono", monospace;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--teal);
    font-size: 0.82rem;
}

h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.04em;
}

h1 {
    max-width: 12ch;
    font-size: clamp(3rem, 9vw, 6rem);
    line-height: 0.92;
    margin-top: 1rem;
}

.hero-copy,
.section-copy,
.catalog-hypothesis,
.benchmark-card p,
.anchor-card p,
.catalog-card p,
#footer-copy,
#run-results p {
    color: var(--muted);
}

.hero-copy {
    max-width: 52rem;
    margin-top: 1.25rem;
    font-size: 1.12rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 1.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 700;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button.primary {
    background: linear-gradient(135deg, var(--brass), #d9c39b);
    color: #102025;
}

.button.secondary {
    border-color: var(--line);
    color: var(--text);
}

.hero-metrics,
.anchor-grid,
.benchmark-grid,
.run-summary,
.catalog-grid,
.memory-grid,
.plan-grid {
    display: grid;
    gap: 1rem;
}

.hero-metrics {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-top: 2rem;
}

.metric-card,
.anchor-card,
.benchmark-card,
.summary-card,
.catalog-card,
.memory-card,
.plan-card {
    background: var(--panel-strong);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.2rem;
}

.metric-value,
.summary-value {
    font-size: 1.8rem;
    margin-top: 0.4rem;
}

main {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.panel {
    border-radius: 24px;
    padding: 2rem;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.anchor-grid,
.benchmark-grid,
.catalog-grid,
.memory-grid,
.plan-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.anchor-card h3,
.benchmark-card h3,
.catalog-card h3,
.memory-card h3,
.plan-card h3 {
    margin: 0.75rem 0 0.55rem;
    font-size: 1.35rem;
}

.mono,
.preview-cell,
#run-results td:nth-child(3),
#run-results td:nth-child(4) {
    font-family: "IBM Plex Mono", monospace;
}

.benchmark-topline {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
}

.benchmark-bar {
    height: 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    margin: 1rem 0;
    overflow: hidden;
}

.benchmark-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--teal), var(--brass));
}

.run-summary {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin-bottom: 1.5rem;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
 td {
    padding: 1rem 1.1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}

th {
    font-family: "IBM Plex Mono", monospace;
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.78rem;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.status.no_match {
    color: var(--warning);
    border-color: rgba(255, 131, 94, 0.4);
    background: rgba(255, 131, 94, 0.12);
}

.status.match {
    color: var(--success);
    border-color: rgba(145, 217, 140, 0.4);
    background: rgba(145, 217, 140, 0.12);
}

.status.pending {
    color: var(--pending);
    border-color: rgba(139, 158, 163, 0.4);
    background: rgba(139, 158, 163, 0.12);
}

.catalog-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    align-items: center;
    font-family: "IBM Plex Mono", monospace;
    color: var(--muted);
    text-transform: uppercase;
    font-size: 0.78rem;
}

.memory-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.plan-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.memory-topline {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.plan-topline {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.memory-preview {
    color: var(--text);
    line-height: 1.5;
    word-break: break-word;
}

.memory-meta,
.memory-chain,
.memory-clues,
.plan-thesis,
.plan-clues,
.plan-command {
    color: var(--muted);
}

.plan-command {
    word-break: break-word;
}

.memory-empty {
    grid-column: 1 / -1;
}

.plan-empty {
    grid-column: 1 / -1;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.strategy-pill,
.hint-pill,
.plan-metrics span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.76rem;
}

.strategy-pill {
    color: var(--text);
    background: rgba(115, 205, 191, 0.08);
}

.hint-pill {
    color: var(--teal);
    background: rgba(198, 168, 109, 0.08);
}

.plan-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.footer {
    border-radius: 20px;
    padding: 1.4rem 1.6rem;
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer a {
    color: var(--teal);
    font-weight: 700;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.load-error .panel,
.load-error .footer {
    opacity: 1;
}

@media (max-width: 720px) {
    .site-shell {
        width: min(100% - 1rem, 1200px);
        padding-top: 1rem;
    }

    .hero,
    .panel {
        padding: 1.4rem;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* K4 Ciphertext Display */
.k4-display { text-align: center; }
.k4-text {
    font-family: "IBM Plex Mono", monospace;
    font-size: 1.15rem;
    line-height: 2.2;
    letter-spacing: 0.15em;
    word-break: break-all;
    padding: 1.5rem;
    background: rgba(0,0,0,0.35);
    border-radius: 8px;
    border: 1px solid var(--line);
    margin-bottom: 1rem;
}
.k4-char { display: inline-block; padding: 2px 1px; }
.k4-char.known-east { color: var(--teal); font-weight: 700; }
.k4-char.known-berlin { color: var(--brass); font-weight: 700; }
.k4-char.unknown { color: var(--muted); opacity: 0.7; }
.k4-legend { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); }
.legend-item { display: flex; align-items: center; gap: 0.4rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend-dot.unknown { background: var(--muted); opacity: 0.5; }
.legend-dot.known-east { background: var(--teal); }
.legend-dot.known-berlin { background: var(--brass); }

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
    text-align: center;
    padding: 2rem 1rem !important;
}
.stat { display: flex; flex-direction: column; gap: 0.25rem; }
.stat-number { font-family: "IBM Plex Mono", monospace; font-size: 2rem; font-weight: 700; color: var(--teal); }
.stat-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* Elimination Table */
.elimination-table { width: 100%; }
.elimination-table td:first-child { font-weight: 500; white-space: nowrap; }
.elimination-table td:nth-child(2) { white-space: nowrap; font-family: "IBM Plex Mono", monospace; font-size: 0.85rem; }
tr.eliminated td:nth-child(2) { color: #ff6b6b; }
tr.unlikely td:nth-child(2) { color: var(--warning); }
tr.possible td:nth-child(2) { color: var(--success); }

/* Findings Grid */
.findings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}
.finding-card {
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.5rem;
}
.finding-card h3 {
    font-size: 1rem;
    color: var(--teal);
    margin-bottom: 0.75rem;
}
.finding-card code {
    display: block;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.9rem;
    color: var(--brass);
    background: rgba(0,0,0,0.3);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.1em;
}
.finding-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--muted);
}
.finding-card strong { color: var(--text); }

/* Diff Table */
.diff-table td:first-child { font-family: "IBM Plex Mono", monospace; font-size: 0.8rem; color: var(--teal); }
.diff-table td:nth-child(2) { font-family: "IBM Plex Mono", monospace; font-size: 0.8rem; color: var(--muted); }
.diff-table td:nth-child(3) { font-weight: 500; color: var(--brass); white-space: nowrap; }
.diff-table em { color: var(--muted); opacity: 0.6; }

/* Catalog Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.75rem;
}
.catalog-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    transition: background 0.2s;
}
.catalog-card:hover { background: rgba(0,0,0,0.35); }
.catalog-id {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 1.5rem;
    text-align: right;
}
.catalog-body { flex: 1; min-width: 0; }
.catalog-name { font-size: 0.85rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catalog-meta { display: flex; gap: 0.75rem; margin-top: 0.2rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.catalog-cat { opacity: 0.8; }
.catalog-status { opacity: 0.9; }
logout
