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

:root {
    --bg:        #0f1117;
    --surface:   #181b23;
    --surface2:  #1e2230;
    --border:    #2a2e3b;
    --text:      #e2e4ea;
    --text-dim:  #8b8fa3;
    --accent:    #4f8cff;
    --accent-dim:#2d5aa0;
    --green:     #34d399;
    --yellow:    #fbbf24;
    --orange:    #fb923c;
    --red:       #f87171;
    --critical:  #dc2626;
    --radius:    8px;
    --mono:      'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

html { font-size: 15px; }

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.85em; }

/* ── Header ──────────────────────────────────── */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 1.5rem;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.logo-icon {
    font-size: 1.8rem;
    color: var(--accent);
}
.logo h1 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.accent { color: var(--accent); }

/* ── Nav ─────────────────────────────────────── */
.nav-links {
    display: flex;
    gap: 0.3rem;
}
.nav-link {
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dim);
    text-decoration: none;
    transition: all 0.15s;
}
.nav-link:hover {
    color: var(--text);
    background: var(--surface2);
    text-decoration: none;
}
.nav-link.active {
    color: var(--accent);
    background: rgba(79, 140, 255, 0.1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.user-badge {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: var(--mono);
}
.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
}

/* ── Main ────────────────────────────────────── */
main {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
    width: 100%;
    flex: 1;
}

/* ── Panel ───────────────────────────────────── */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.2rem;
}
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}
.panel-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.panel-actions {
    display: flex;
    gap: 0.5rem;
}

/* ── Textarea ────────────────────────────────── */
#alert-input {
    width: 100%;
    min-height: 180px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.85rem;
    padding: 1rem;
    resize: vertical;
    line-height: 1.5;
}
#alert-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.15);
}
#alert-input::placeholder { color: var(--text-dim); opacity: 0.5; }

/* ── Drop Zone ───────────────────────────────── */
.drop-zone {
    position: relative;
}
.drop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(79, 140, 255, 0.1);
    border: 2px dashed var(--accent);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}
.drop-overlay span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
}

/* ── Buttons ─────────────────────────────────── */
.btn {
    padding: 0.45rem 1rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover { background: #3d7ae8; text-decoration: none; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
    background: var(--surface2);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover { background: var(--border); text-decoration: none; }
.btn-ghost {
    background: transparent;
    color: var(--text-dim);
    border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); background: var(--surface2); text-decoration: none; }

.submit-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.8rem;
}
.status-msg {
    color: var(--text-dim);
    font-size: 0.8rem;
}
.status-msg.error { color: var(--red); }

/* ── Risk Banner ─────────────────────────────── */
.risk-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.2rem;
    background: var(--surface2);
    border: 1px solid var(--border);
}
.risk-left, .risk-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.risk-label, .confidence-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}
.risk-level {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.confidence-bar-wrap {
    width: 120px;
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}
.confidence-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}
.confidence-val {
    font-family: var(--mono);
    font-size: 0.95rem;
    font-weight: 600;
    min-width: 3ch;
}

/* Risk color classes */
.risk-low       { color: var(--green); }
.risk-medium    { color: var(--yellow); }
.risk-high      { color: var(--orange); }
.risk-critical  { color: var(--red); }
.font-bold { font-weight: 700; }

.risk-banner.banner-low      { border-color: var(--green);   }
.risk-banner.banner-medium   { border-color: var(--yellow);  }
.risk-banner.banner-high     { border-color: var(--orange);  }
.risk-banner.banner-critical { border-color: var(--red); background: rgba(220,38,38,0.06); }

.conf-bar-low      { background: var(--green);  }
.conf-bar-medium   { background: var(--yellow); }
.conf-bar-high     { background: var(--orange); }
.conf-bar-critical { background: var(--red);    }

/* ── Result Sections ─────────────────────────── */
.result-section {
    margin-bottom: 1.2rem;
}
.result-section h3, .result-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.6rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
}
.result-section-title { margin-top: 1rem; }
.summary-text {
    font-size: 1rem;
    line-height: 1.6;
}

/* Observables Grid */
.observables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}
.obs-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 0.8rem;
}
.obs-key {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
}
.obs-val {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text);
    word-break: break-all;
}

/* Rationale & Actions lists */
.rationale-list, .actions-list {
    list-style: none;
    padding: 0;
}
.rationale-list li, .actions-list li {
    padding: 0.4rem 0 0.4rem 1.2rem;
    position: relative;
    line-height: 1.5;
    font-size: 0.9rem;
}
.rationale-list li::before {
    content: "\25B8";
    position: absolute;
    left: 0;
    color: var(--accent);
}
.actions-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--green);
}

/* Decision Paths */
.decision-paths {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.6rem;
}
.path-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.8rem 1rem;
}
.path-card strong {
    display: block;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 0.3rem;
}
.path-card span {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.4;
}

/* SPL Checks */
.spl-checks { display: flex; flex-direction: column; gap: 0.6rem; }
.spl-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.spl-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.8rem;
    background: var(--surface2);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
}
.spl-title .btn-copy {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}
.spl-title .btn-copy:hover { color: var(--text); border-color: var(--text-dim); }
.spl-code {
    padding: 0.6rem 0.8rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--green);
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.5;
}

/* Raw JSON */
.raw-json {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    max-height: 400px;
    overflow: auto;
    margin-top: 0.6rem;
    white-space: pre-wrap;
    color: var(--text-dim);
}

/* ── Verdict Bar ─────────────────────────────── */
.verdict-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.verdict-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 0.3rem;
}
.verdict-btn {
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-dim);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}
.verdict-btn:hover { border-color: var(--accent); color: var(--text); }
.verdict-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.verdict-btn[data-verdict="true_positive"].active { background: var(--red); border-color: var(--red); }
.verdict-btn[data-verdict="false_positive"].active { background: var(--green); border-color: var(--green); }
.verdict-btn[data-verdict="benign"].active { background: var(--accent); border-color: var(--accent); }
.verdict-btn[data-verdict="escalated"].active { background: var(--orange); border-color: var(--orange); }

.verdict-notes {
    flex: 1;
    min-width: 150px;
    padding: 0.3rem 0.6rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.8rem;
}
.verdict-notes:focus { outline: none; border-color: var(--accent); }

/* ── Verdict Tags ────────────────────────────── */
.verdict-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tag-pending { background: rgba(139,143,163,0.15); color: var(--text-dim); }
.tag-true-positive { background: rgba(248,113,113,0.15); color: var(--red); }
.tag-false-positive { background: rgba(52,211,153,0.15); color: var(--green); }
.tag-benign { background: rgba(79,140,255,0.15); color: var(--accent); }
.tag-escalated { background: rgba(251,147,60,0.15); color: var(--orange); }

/* ── Data Table ──────────────────────────────── */
.table-wrap {
    overflow-x: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.data-table th {
    text-align: left;
    padding: 0.5rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tbody tr:hover {
    background: var(--surface2);
}
.data-table .col-time {
    white-space: nowrap;
    font-size: 0.8rem;
    color: var(--text-dim);
}
.row-error td { color: var(--red); }
.empty-msg {
    text-align: center;
    padding: 2rem;
    color: var(--text-dim);
}
.badge {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-dim);
}

/* ── Filter Bar ──────────────────────────────── */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.filter-input {
    flex: 1;
    min-width: 200px;
    padding: 0.45rem 0.8rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.85rem;
}
.filter-input:focus { outline: none; border-color: var(--accent); }
.filter-select {
    padding: 0.45rem 0.6rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.85rem;
}

/* ── Pagination ──────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}
.page-info {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ── Modal ───────────────────────────────────── */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}
.modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 1001;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.modal-header h2 {
    font-size: 1.1rem;
}

/* ── Dashboard ───────────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    text-align: center;
}
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--mono);
}
.stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.3rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}
.dash-panel {
    margin-bottom: 0;
}
.dash-wide {
    grid-column: 1 / -1;
}
.dash-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.8rem;
}

/* Bar Charts */
.risk-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.bar-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.bar-label {
    width: 90px;
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: right;
    flex-shrink: 0;
}
.bar-track {
    flex: 1;
    height: 20px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
    min-width: 2px;
}
.bar-value {
    width: 80px;
    font-size: 0.8rem;
    font-family: var(--mono);
    color: var(--text-dim);
    flex-shrink: 0;
}

/* Volume Chart */
.volume-chart {
    height: 160px;
}
.vol-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 100%;
}
.vol-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}
.vol-bar {
    width: 100%;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    transition: height 0.4s ease;
}
.vol-label {
    font-size: 0.55rem;
    color: var(--text-dim);
    margin-top: 0.2rem;
    white-space: nowrap;
}

/* Top Lists */
.top-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    background: var(--bg);
    border-radius: 4px;
}
.top-val {
    font-size: 0.85rem;
    color: var(--text);
}
.top-count {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 600;
}

/* ── Chat Panel ──────────────────────────────── */
.chat-panel {
    background: var(--surface);
}
.chat-unavailable {
    padding: 1rem;
    background: rgba(251,147,60,0.08);
    border: 1px solid var(--orange);
    border-radius: var(--radius);
    color: var(--orange);
    font-size: 0.9rem;
    text-align: center;
}
.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 500px;
    overflow-y: auto;
    padding: 0.8rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.8rem;
    min-height: 200px;
}
.chat-bubble {
    padding: 0.7rem 1rem;
    border-radius: 12px;
    max-width: 85%;
    font-size: 0.9rem;
    line-height: 1.55;
    word-wrap: break-word;
}
/* Plain text user bubbles preserve newlines */
.chat-user {
    white-space: pre-wrap;
}

/* Rendered markdown inside assistant bubbles */
.chat-assistant > *:first-child { margin-top: 0; }
.chat-assistant > *:last-child  { margin-bottom: 0; }
.chat-assistant p {
    margin: 0 0 0.6rem 0;
    line-height: 1.55;
}
.chat-assistant h1,
.chat-assistant h2,
.chat-assistant h3,
.chat-assistant h4 {
    font-weight: 600;
    margin: 0.8rem 0 0.4rem 0;
    line-height: 1.3;
    color: var(--text);
}
.chat-assistant h1 { font-size: 1.15rem; }
.chat-assistant h2 { font-size: 1.05rem; }
.chat-assistant h3 { font-size: 0.95rem; color: var(--accent); }
.chat-assistant h4 { font-size: 0.9rem;  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.chat-assistant strong { color: var(--text); font-weight: 600; }
.chat-assistant em { font-style: italic; }
.chat-assistant ul,
.chat-assistant ol {
    margin: 0.4rem 0 0.6rem 1.4rem;
    padding: 0;
}
.chat-assistant li {
    margin-bottom: 0.25rem;
    line-height: 1.5;
}
.chat-assistant li > p { margin: 0; }
.chat-assistant code {
    background: var(--bg);
    color: var(--green);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-family: var(--mono);
    font-size: 0.82rem;
}
.chat-assistant pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.7rem 0.9rem;
    margin: 0.5rem 0;
    overflow-x: auto;
}
.chat-assistant pre code {
    background: transparent;
    padding: 0;
    color: var(--text);
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: pre;
}
.chat-assistant blockquote {
    border-left: 3px solid var(--accent);
    margin: 0.5rem 0;
    padding: 0.2rem 0.8rem;
    color: var(--text-dim);
}
.chat-assistant a {
    color: var(--accent);
    text-decoration: underline;
}
.chat-assistant hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.8rem 0;
}
.chat-assistant table {
    border-collapse: collapse;
    margin: 0.5rem 0;
    font-size: 0.82rem;
}
.chat-assistant th, .chat-assistant td {
    border: 1px solid var(--border);
    padding: 0.3rem 0.6rem;
    text-align: left;
}
.chat-assistant th {
    background: var(--surface2);
    color: var(--text-dim);
}
.chat-user {
    align-self: flex-end;
    background: var(--accent);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-assistant {
    align-self: flex-start;
    background: var(--surface2);
    color: var(--text);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}
.chat-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}
.chat-input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.4;
    resize: vertical;
    min-height: 50px;
}
.chat-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.15);
}
.chat-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Utilities ───────────────────────────────── */
.hidden { display: none !important; }

/* ── Footer ──────────────────────────────────── */
footer {
    text-align: center;
    padding: 1rem;
    color: var(--text-dim);
    font-size: 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

/* ── Loading spinner ─────────────────────────── */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.4rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
    main { padding: 0 0.8rem; }
    .panel { padding: 1rem; }
    .risk-banner { flex-direction: column; gap: 0.6rem; align-items: flex-start; }
    .observables-grid { grid-template-columns: 1fr 1fr; }
    .decision-paths { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .header-inner { flex-wrap: wrap; }
    .nav-links { order: 3; width: 100%; justify-content: center; }
}
