/* styles.css — Professional Dark Theme */
:root {
    --bg-primary: #0f1117;
    --bg-secondary: #161a23;
    --bg-card: #1c2030;
    --bg-card-hover: #222738;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.10);

    --c-asia: #d4a853;
    --c-london: #5b8def;
    --c-ny: #43b581;
    --c-close: #8b95a5;

    --text-pri: rgba(255, 255, 255, 0.92);
    --text-sec: rgba(255, 255, 255, 0.50);
    --text-dim: rgba(255, 255, 255, 0.30);

    --accent-green: #43b581;
    --accent-red: #f04747;
    --accent-blue: #5b8def;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.hidden {
    display: none !important;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-pri);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Background — subtle radial gradient, no blobs */
.background-blobs {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(91, 141, 239, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(67, 181, 129, 0.03) 0%, transparent 60%);
}
.blob { display: none; }

/* Card System */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
}

/* Layout Utilities */
.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding-bottom: 4rem;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.mt-4 { margin-top: 1.25rem; }
.mt-6 { margin-top: 2rem; }
.section-title {
    margin: 1.75rem 0 0.75rem;
    font-weight: 600;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.8rem;
}

/* Header */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 2rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.header-badge {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 168, 83, 0.12);
    border: 1px solid rgba(212, 168, 83, 0.25);
    border-radius: 10px;
    font-size: 1.2rem;
    color: var(--c-asia);
    font-weight: 700;
    flex-shrink: 0;
}
.header-info h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-pri);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.header-tag {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 0.4rem;
    letter-spacing: 0.08em;
    position: relative;
    top: -1px;
}

/* Subtitle */
.subtitle {
    color: var(--text-dim);
    font-size: 0.78rem;
    margin-top: 0.15rem;
    font-weight: 400;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.01em;
    /* Keep the header one line. The text grows with the data range and the
       excluded-day count, and wrapping it pushed the whole header taller. */
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 46ch;
}
.subtitle > span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
/* the one force-refresh control: deliberately quiet, brightens on hover */
.subtitle-refresh {
    flex: 0 0 auto;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 4px;
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1;
    padding: 1px 5px 2px;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.subtitle-refresh:hover { color: var(--text-pri); border-color: rgba(255, 255, 255, 0.28); }
.subtitle-refresh:disabled, .subtitle-refresh.is-busy { opacity: 0.5; cursor: progress; }
.subtitle-refresh.is-busy { animation: subtitle-spin 1s linear infinite; }
@keyframes subtitle-spin { to { transform: rotate(360deg); } }
@media (max-width: 1100px) {
    /* Narrow screens: drop to the range only rather than truncating mid-word. */
    .subtitle { max-width: 26ch; }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.live-status-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.status-label {
    color: var(--text-dim);
    font-weight: 500;
}
.status-value {
    font-weight: 600;
}
.status-bull { color: var(--accent-green); }
.status-bear { color: var(--accent-red); }
.status-range { color: var(--text-sec); }

/* Refresh Button */
.refresh-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-dim);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.15s;
}
.refresh-btn:hover {
    border-color: var(--border-medium);
    color: var(--text-sec);
    background: rgba(255, 255, 255, 0.03);
}
.refresh-btn svg {
    opacity: 0.5;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    position: relative;
    padding: 0 2rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    gap: 0.25rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.tab-nav::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}
.tab-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 0.7rem 1rem;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.tab-btn svg {
    opacity: 0.4;
    transition: opacity 0.2s;
}
.tab-btn:hover {
    color: var(--text-sec);
}
.tab-btn:hover svg {
    opacity: 0.6;
}
.tab-btn.active {
    color: var(--text-pri);
}
.tab-btn.active svg {
    opacity: 0.9;
}
.tab-underline {
    position: absolute;
    bottom: -1px;
    height: 2px;
    background: var(--accent-blue);
    transition: left 0.25s ease, width 0.25s ease;
    width: 0; left: 0;
    border-radius: 1px;
}
/* Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}
.filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.filter-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    color: var(--text-pri);
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
}
.filter-select:hover {
    border-color: rgba(255, 255, 255, 0.2);
}
.filter-select:focus {
    border-color: var(--accent-blue);
}
.filter-select option {
    background: var(--bg-secondary);
    color: var(--text-pri);
}
.filter-count {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease;
}
.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
.loading-card {
    text-align: center;
    width: 100%;
    max-width: 380px;
}
.loading-card h2 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-sec);
    margin-bottom: 0.25rem;
}
.animated-logo {
    font-size: 2.5rem;
    color: var(--accent-blue);
    margin-bottom: 1.25rem;
    animation: pulse 2.5s infinite ease-in-out;
    opacity: 0.8;
}
@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}
.progress-container {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    margin: 1.25rem 0 0.6rem;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-blue);
    transition: width 0.3s ease;
    border-radius: 2px;
}
#loading-status-text {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
}



/* Pages */
.pages-container {
    padding: 1.5rem 2rem;
    position: relative;
}
.page {
    display: none;
    animation: fadeIn 0.3s ease;
}
.page.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stat Cards */
.stat-card h3, .hold-card h3 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.9rem;
}
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    padding: 0.25rem 0;
}
.stat-row .label {
    color: var(--text-sec);
    font-size: 0.82rem;
}
.stat-row .value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-pri);
}
.huge-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.75rem;
    font-weight: 700;
    margin: 0.4rem 0;
    color: var(--text-pri);
}
.sample-size {
    color: var(--text-dim);
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', monospace;
}

/* Session top-border accents */
.border-asia { border-top: 2px solid var(--c-asia); }
.border-london { border-top: 2px solid var(--c-london); }
.border-ny { border-top: 2px solid var(--c-ny); }
.border-close { border-top: 2px solid var(--c-close); }

/* Chart Wrappers */
.glass-card h3 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-sec);
    margin-bottom: 0.75rem;
}
.chart-wrapper {
    position: relative;
    height: 280px;
    width: 100%;
}

/* Heatmap */
.heatmap-container {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}
.heatmap-table {
    border-collapse: collapse;
    width: 100%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
}
.heatmap-table th, .heatmap-table td {
    padding: 3px 2px;
    text-align: center;
    min-width: 28px;
}
.heatmap-table th {
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.65rem;
}
.heatmap-cell {
    position: relative;
    cursor: crosshair;
    border: 1px solid rgba(255,255,255,0.02);
    border-radius: 2px;
    transition: transform 0.08s;
    font-size: 0.6rem;
}
.heatmap-cell:hover {
    transform: scale(1.15);
    z-index: 10;
    outline: 1px solid rgba(255,255,255,0.3);
}

/* Section Description */
.section-desc {
    color: var(--text-dim);
    font-size: 0.78rem;
    margin: -0.5rem 0 0.75rem;
}

/* Trend Tables (Page 4) */
.trend-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
}
.trend-table th {
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.6rem 0.8rem;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}
.trend-table th:first-child {
    text-align: left;
}
.trend-table td {
    padding: 0.55rem 0.8rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.1s;
}
.trend-table td:first-child {
    text-align: left;
    color: var(--text-sec);
    font-weight: 500;
}
.trend-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}
.cell-hot {
    color: var(--accent-green);
    font-weight: 700;
}
.cell-cold {
    color: var(--accent-red);
    font-weight: 700;
}
.cell-dim {
    color: var(--text-dim);
}
.cell-n {
    color: var(--text-dim);
    font-size: 0.72rem;
}

/* Signal Badge */
.signal-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.signal-bullish {
    background: rgba(67, 181, 129, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(67, 181, 129, 0.3);
}
.signal-bearish {
    background: rgba(240, 71, 71, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(240, 71, 71, 0.3);
}
.signal-neutral {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    border: 1px solid var(--border-subtle);
}
.signal-chop {
    background: rgba(91, 141, 239, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(91, 141, 239, 0.25);
}

/* Expansion Reading */
.reading-explosive {
    background: rgba(212, 168, 83, 0.15);
    color: var(--c-asia);
    border: 1px solid rgba(212, 168, 83, 0.3);
}
.reading-normal {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-sec);
    border: 1px solid var(--border-subtle);
}
.reading-compressed {
    background: rgba(91, 141, 239, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(91, 141, 239, 0.25);
}

/* Trade Tracker Styles */
.tracker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.api-input {
    width: 100%;
    margin-bottom: 10px;
    padding: 0.8rem;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-subtle);
    color: var(--text-pri);
    border-radius: 6px;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}
.api-input:focus {
    outline: none;
    border-color: rgba(91, 141, 239, 0.5);
    background: rgba(0, 0, 0, 0.4);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.cal-day {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    padding: 6px;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: default;
}

.cal-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10;
}

.cal-day.empty-padding {
    opacity: 0;
    pointer-events: none;
}

.cal-day.no-trades {
    /* Base style applies */
}

.cal-day.green {
    background: rgba(67, 181, 129, 0.15);
    border-color: rgba(67, 181, 129, 0.3);
}

.cal-day.red {
    background: rgba(240, 71, 71, 0.15);
    border-color: rgba(240, 71, 71, 0.3);
}

.cal-date {
    font-size: 0.75rem;
    color: var(--text-sec);
    align-self: flex-end;
    font-weight: 500;
}

.cal-pnl {
    font-weight: 700;
    color: var(--text-main);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px dashed var(--border-subtle);
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal.hidden {
    display: none;
}
.modal-content {
    width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* Responsive */
@media (max-width: 1024px) {
    .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .site-header { flex-direction: column; gap: 0.75rem; text-align: center; }
    .pages-container { padding: 1rem; }
}

/* --- AI Chat Panel --- */
.ai-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-main), #8b5cf6);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(91, 141, 239, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
}
.ai-fab:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 25px rgba(91, 141, 239, 0.6);
}
.ai-chat-panel {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom right;
}
.ai-chat-panel.hidden {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
}
.ai-chat-header {
    padding: 15px 20px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ai-chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.ai-chat-history::-webkit-scrollbar {
    width: 6px;
}
.ai-chat-history::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}
.ai-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}
.ai-msg.bot-msg {
    align-self: flex-start;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}
.ai-msg.bot-msg strong {
    display: block;
    color: var(--accent-main);
    margin-bottom: 5px;
    font-size: 0.8rem;
}
.ai-msg.bot-msg p { margin: 0; }
.ai-msg.user-msg {
    align-self: flex-end;
    background: var(--accent-main);
    color: white;
}
.ai-chat-input-area {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
    display: flex;
    gap: 10px;
}
#ai-chat-input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    padding: 10px;
    font-family: "Inter", sans-serif;
    font-size: 0.9rem;
    resize: none;
    height: 45px;
}
#ai-chat-input:focus {
    outline: none;
    border-color: var(--accent-main);
}
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 5px 0;
}
.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--text-dim);
    border-radius: 50%;
    animation: typing 1s infinite alternate;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
    0% { transform: translateY(0); opacity: 0.5; }
    100% { transform: translateY(-4px); opacity: 1; }
}

.swarm-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 15px; }
.agent-status-bar { display: flex; gap: 15px; }
.agent-badge { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-dim); background: rgba(255,255,255,0.05); padding: 4px 10px; border-radius: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.green { background-color: var(--accent-green); box-shadow: 0 0 8px rgba(67, 181, 129, 0.6); }
.dot.red { background-color: var(--accent-red); box-shadow: 0 0 8px rgba(228, 62, 97, 0.6); }
.terminal-log { background: #0c0c0c; border: 1px solid rgba(255,255,255,0.1); }

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: rgba(13, 17, 28, 0.95);
    border: 1px solid var(--accent-main);
    border-left: 4px solid var(--accent-main);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 15px rgba(91, 141, 239, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px;
    padding: 15px 20px;
    color: white;
    font-family: 'Inter', sans-serif;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    pointer-events: auto;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-main);
}

.toast-body {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}



/* Executive Briefing Styles for Live Monitor */
.executive-briefing {
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #E2E8F0;
    line-height: 1.8;
}

.briefing-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.briefing-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #FFFFFF;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.briefing-divider {
    height: 1px;
    background: linear-gradient(90deg, var(--accent-main), transparent);
    margin-bottom: 40px;
}

.briefing-section {
    margin-bottom: 35px;
}

.briefing-header {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.briefing-section p {
    font-size: 17px;
    color: #CBD5E1;
    margin: 0;
    font-weight: 400;
}

/* Highlight tags for narrative */
.hl-green {
    color: var(--accent-green);
    font-weight: 600;
}
.hl-red {
    color: var(--accent-red);
    font-weight: 600;
}
.hl-neutral {
    color: var(--text-secondary);
    font-weight: 600;
}
.hl-blue {
    color: var(--accent-main);
    font-weight: 600;
}
.hl-orange {
    color: orange;
    font-weight: 600;
}


/* Live Edge Monitor HUD */
.hud-container {
    padding: 30px;
    max-width: 950px;
    margin: 0 auto;
    font-family: 'JetBrains Mono', monospace;
    color: #E2E8F0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    margin-bottom: 10px;
}

.hud-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #FFFFFF;
    margin: 0;
}

.hud-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.hud-badge.uptrending {
    color: var(--accent-green);
    background: rgba(67, 181, 129, 0.15);
    border: 1px solid rgba(67, 181, 129, 0.3);
}

.hud-badge.downtrending {
    color: var(--accent-red);
    background: rgba(228, 62, 97, 0.15);
    border: 1px solid rgba(228, 62, 97, 0.3);
}

.hud-subtitle {
    font-family: 'Inter', sans-serif;
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 30px;
}

.hud-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hud-panel-full {
    grid-column: 1 / -1;
}

.hud-panel {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
}

.hud-panel-title {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.hud-accent {
    color: #FFFFFF;
    font-weight: 700;
    margin-left: 5px;
}

.hud-stats-row {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.hud-stat-box {
    flex: 1;
}

.hud-stat-label {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.hud-stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.text-blue { color: var(--accent-main); }
.bg-green { background: var(--accent-green); box-shadow: 0 0 10px var(--accent-green); }
.bg-red { background: var(--accent-red); box-shadow: 0 0 10px var(--accent-red); }
.bg-blue { background: var(--accent-main); box-shadow: 0 0 10px var(--accent-main); }

.hud-bar-bg {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.hud-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease-out;
}

.hud-stats-stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hud-stack-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.hud-stack-label {
    font-size: 13px;
    color: #CBD5E1;
}

.hud-stack-value {
    font-size: 18px;
    font-weight: 700;
}

.hud-dynamic-state {
    font-size: 16px;
    font-weight: 500;
    color: #FFFFFF;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--text-secondary);
    border-radius: 0 4px 4px 0;
}
.hud-dynamic-state.active-high { border-color: var(--accent-green); }
.hud-dynamic-state.active-low { border-color: var(--accent-red); }


/* Asymmetric Grid for Live Monitor */
.asym-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* --- PREMIUM BENTO UI --- */
.bento-card {
    background: linear-gradient(180deg, #1A1D24 0%, #111216 100%);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.bento-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.bento-massive-number {
    font-size: 64px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 10px;
    font-family: 'JetBrains Mono', monospace;
}

.neon-green {
    color: #6ee7b7;
    text-shadow: 0 0 25px rgba(110, 231, 183, 0.4);
}

.neon-red {
    color: #fda4af;
    text-shadow: 0 0 25px rgba(253, 164, 175, 0.4);
}

.pill-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.pill-green {
    background: rgba(110, 231, 183, 0.1);
    border: 1px solid rgba(110, 231, 183, 0.2);
    color: #6ee7b7;
}

.pill-red {
    background: rgba(253, 164, 175, 0.1);
    border: 1px solid rgba(253, 164, 175, 0.2);
    color: #fda4af;
}

.pill-neutral {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
}

.bento-details {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bento-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-dim);
}

.bento-detail-row span:last-child {
    color: #fff;
    font-weight: 500;
}

.bento-macro-row {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 15px;
}

.bento-macro-item {
    font-size: 11px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 4px;
}

.bento-macro-item span {
    color: #6ee7b7;
    font-weight: 600;
}

/* ---------------------------------------------------------------------------
   TODAY'S READ (Live Monitor day narrative)
   --------------------------------------------------------------------------- */
.dn-stamp {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-dim);
}
.dn-headline {
    font-size: 21px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin: 2px 0 8px;
    color: var(--text-pri);
}
.dn-headline.dn-up   { color: #6ee7b7; text-shadow: 0 0 22px rgba(110, 231, 183, 0.25); }
.dn-headline.dn-down { color: #fda4af; text-shadow: 0 0 22px rgba(253, 164, 175, 0.25); }
.dn-context {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    line-height: 1.6;
    letter-spacing: 0.01em;
    color: var(--text-sec);
    margin-bottom: 20px;
}
/* headline + context, full width; then one row: OTF panel | Day setup | Asia | London */
.dn-top { margin-bottom: 18px; }
.dn-top .dn-context { margin-bottom: 0; }
.dn-row {
    display: grid;
    grid-template-columns: minmax(230px, 0.72fr) minmax(0, 3fr);
    gap: 14px;
    align-items: stretch;
}
@media (max-width: 1100px) { .dn-row { grid-template-columns: 1fr; } }

.dn-otf {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 14px 10px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.dn-otf.dn-otf-up   { border-color: rgba(110, 231, 183, 0.22); }
.dn-otf.dn-otf-down { border-color: rgba(253, 164, 175, 0.22); }
.dn-otf-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.dn-otf-dir {
    font-family: 'JetBrains Mono', monospace;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}
.dn-otf-up   .dn-otf-dir { color: #6ee7b7; text-shadow: 0 0 20px rgba(110, 231, 183, 0.3); }
.dn-otf-down .dn-otf-dir { color: #fda4af; text-shadow: 0 0 20px rgba(253, 164, 175, 0.3); }
.dn-otf-flat .dn-otf-dir { color: var(--text-sec); }
.dn-otf-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    line-height: 1.75;
    color: var(--text-sec);
}
.dn-otf-meta b { color: var(--text-pri); font-weight: 600; }
.dn-otf-meta .dn-warn { color: #f5a524; }
.dn-otf-meta .dn-ok   { color: #6ee7b7; }
/* the sparkline takes whatever height the row leaves, so the panel never has a dead zone */
.dn-spark {
    position: relative;
    flex: 1 1 auto;
    min-height: 56px;
    margin-top: 12px;
}
.dn-spark canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }

/* ---- the plan: sweep -> target paths ---- */
.ts-lead {
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--text-pri);
    padding: 2px 2px 14px;
}
.ts-lead div + div { margin-top: 6px; }
.ts-lead b { font-weight: 600; }
.ts-lead-flat { color: var(--text-sec); }
.ts-lead-older { color: var(--text-dim); font-size: 13px; margin-left: 6px; }
.ts-lead-long, .ts-lead-short {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 2px 7px;
    border-radius: 4px;
    margin-right: 4px;
    vertical-align: 1px;
}
.ts-lead-long  { color: #6ee7b7; background: rgba(110, 231, 183, 0.10); border: 1px solid rgba(110, 231, 183, 0.25); }
.ts-lead-short { color: #fda4af; background: rgba(253, 164, 175, 0.10); border: 1px solid rgba(253, 164, 175, 0.25); }

.ts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
@media (max-width: 1100px) { .ts-grid { grid-template-columns: 1fr; } }
.ts-side {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 14px 16px 12px;
    min-width: 0;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.ts-long.ts-state-live  { border-color: rgba(110, 231, 183, 0.45); box-shadow: 0 0 0 1px rgba(110, 231, 183, 0.12), 0 0 28px rgba(110, 231, 183, 0.08); }
.ts-short.ts-state-live { border-color: rgba(253, 164, 175, 0.45); box-shadow: 0 0 0 1px rgba(253, 164, 175, 0.12), 0 0 28px rgba(253, 164, 175, 0.08); }
.ts-state-pending { border-color: rgba(245, 165, 36, 0.35); }
.ts-state-failed, .ts-state-done { opacity: 0.72; }
.ts-badge-done { color: var(--text-sec); }
.ts-status-done { color: var(--text-sec); background: rgba(255, 255, 255, 0.04); }
.ts-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ts-dir {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
}
.ts-long  .ts-dir { color: #6ee7b7; }
.ts-short .ts-dir { color: #fda4af; }
.ts-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 3px 9px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
}
.ts-badge-live    { color: #0b1a14; background: #6ee7b7; border-color: #6ee7b7; }
.ts-short .ts-badge-live { color: #1f0b0e; background: #fda4af; border-color: #fda4af; }
.ts-badge-pending { color: #f5a524; border-color: rgba(245, 165, 36, 0.4); background: rgba(245, 165, 36, 0.08); }
.ts-badge-failed  { color: var(--text-sec); }
.ts-sweep {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}
.ts-sweep-l { font-size: 17px; color: var(--text-pri); }
.ts-sweep-l b { font-weight: 600; }
.ts-sweep-l .kl-tag {
    display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 4px;
    font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase;
    color: #f5a524; background: rgba(245, 165, 36, 0.10); border: 1px solid rgba(245, 165, 36, 0.25);
    vertical-align: 2px;
}
.ts-sweep-r { display: flex; align-items: baseline; gap: 8px; font-family: 'JetBrains Mono', monospace; }
.ts-px { font-size: 22px; font-weight: 700; color: var(--text-pri); }
.ts-dist { font-size: 12.5px; color: var(--text-dim); }
.ts-meta {
    font-size: 13px;
    color: var(--text-sec);
    margin-top: 6px;
    line-height: 1.6;
}
.ts-meta b { color: var(--text-pri); font-weight: 600; }
.ts-status {
    margin-top: 10px;
    padding: 8px 11px;
    border-radius: 6px;
    font-size: 13.5px;
    line-height: 1.45;
}
.ts-status-live    { color: #6ee7b7; background: rgba(110, 231, 183, 0.08); }
.ts-short .ts-status-live { color: #fda4af; background: rgba(253, 164, 175, 0.08); }
.ts-status-pending { color: #f5a524; background: rgba(245, 165, 36, 0.08); }
.ts-status-failed  { color: var(--text-sec); background: rgba(255, 255, 255, 0.04); }
/* the sweep candle's quality, once there is one */
.ts-quality { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 9px; }
.ts-quality-l { color: var(--text-dim); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; margin-right: 4px; }
.ts-chip {
    font-size: 12.5px;
    padding: 3px 9px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--text-sec);
    background: rgba(255, 255, 255, 0.04);
}
.ts-chip-high { color: #6ee7b7; border-color: rgba(110, 231, 183, 0.3); background: rgba(110, 231, 183, 0.07); }
.ts-short .ts-chip-high { color: #fda4af; border-color: rgba(253, 164, 175, 0.3); background: rgba(253, 164, 175, 0.07); }
.ts-chip-low { color: #f5a524; border-color: rgba(245, 165, 36, 0.3); background: rgba(245, 165, 36, 0.07); }
.ts-targets { margin-top: 12px; }
.ts-targets-h {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding-bottom: 5px;
}
.ts-tgt {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    column-gap: 12px;
    row-gap: 3px;
    align-items: baseline;
    padding: 8px 0 7px;
    border-top: 1px solid rgba(255, 255, 255, 0.045);
}
.ts-tgt-l { font-size: 14.5px; color: var(--text-pri); }
.ts-tgt-dist { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--text-dim); margin-left: 10px; }
.ts-tgt-px { font-family: 'JetBrains Mono', monospace; font-size: 13.5px; color: var(--text-sec); }
.ts-tgt-rate {
    font-family: 'JetBrains Mono', monospace;
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    text-align: right;
    min-width: 44px;
}
.ts-hi  { color: #6ee7b7; }
.ts-short .ts-hi { color: #fda4af; }
.ts-mid { color: var(--text-pri); }
.ts-lo  { color: var(--text-dim); }
.ts-bar {
    grid-column: 1 / -1;
    position: relative;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.06);
}
.ts-bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: rgba(255, 255, 255, 0.32); }
.ts-long  .ts-bar span { background: rgba(110, 231, 183, 0.65); }
.ts-short .ts-bar span { background: rgba(253, 164, 175, 0.65); }
.ts-bar i { position: absolute; top: -3px; width: 2px; height: 9px; margin-left: -1px; background: rgba(255, 255, 255, 0.5); border-radius: 1px; }
.ts-tgt-meta { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }
.ts-tgt-meta b { color: var(--text-pri); font-weight: 600; }
.ts-reached .ts-tgt-l, .ts-reached .ts-tgt-rate { opacity: 0.55; }
.ts-done {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    margin-left: 8px;
    color: #6ee7b7;
    opacity: 1;
}
.ts-others {
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    font-size: 13px;
    color: var(--text-sec);
    line-height: 1.8;
}
.ts-others-l { color: var(--text-dim); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; margin-right: 10px; }
.ts-other { display: inline-block; margin-right: 14px; white-space: nowrap; }
.ts-other b { color: var(--text-pri); font-weight: 600; }
.ts-other em { font-style: normal; color: #f5a524; font-size: 11px; }
.ts-other-failed { opacity: 0.55; }
.ts-other-live { color: var(--text-pri); }
.ts-empty-side { display: flex; flex-direction: column; }
.ts-empty { font-size: 13.5px; font-style: italic; color: var(--text-dim); padding: 4px 0; }
.ts-foot {
    margin-top: 14px;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--text-dim);
}
.ts-foot b { color: var(--text-sec); font-weight: 600; }

/* key levels ladder */
.kl-ladder { display: flex; flex-direction: column; }
.kl-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 260px) auto auto;
    column-gap: 18px;
    align-items: baseline;
    padding: 7px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.045);
    font-size: 12.5px;
}
.kl-row:first-child { border-top: 0; }
.kl-label { color: var(--text-pri); }
.kl-label .kl-sofar { color: var(--text-dim); font-size: 10.5px; margin-left: 6px; }
.kl-label .kl-tag {
    display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 4px;
    font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase;
    color: #f5a524; background: rgba(245, 165, 36, 0.10); border: 1px solid rgba(245, 165, 36, 0.25);
    vertical-align: 1px;
}
/* hit-rate cell: "how often does this kind of level get taken today" */
.kl-hit { display: flex; align-items: baseline; gap: 8px; min-width: 0; cursor: help; }
.kl-hit-rate { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; }
.kl-hit-meta { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kl-hit-hi  .kl-hit-rate { color: #6ee7b7; }
.kl-hit-lo  .kl-hit-rate { color: #fda4af; }
.kl-hit-mid .kl-hit-rate { color: var(--text-pri); }
.kl-hit-cond .kl-hit-meta { color: var(--text-sec); }
.kl-hit-none { color: var(--text-dim); font-family: 'JetBrains Mono', monospace; }
.kl-hit-yes { color: #6ee7b7; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; font-weight: 600; }
.kl-hit-no  { color: var(--text-sec); font-family: 'JetBrains Mono', monospace; font-size: 11.5px; }
@media (max-width: 1100px) { .kl-row { grid-template-columns: minmax(0, 1fr) auto; } .kl-hit { grid-column: 1 / -1; } }
.kl-price { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text-pri); text-align: right; }
.kl-dist  { font-family: 'JetBrains Mono', monospace; font-size: 11px; text-align: right; min-width: 64px; }
.kl-above .kl-dist { color: #fda4af; }
.kl-below .kl-dist { color: #6ee7b7; }
.kl-now {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-dim);
}
.kl-now::before, .kl-now::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.12); }
.kl-now b { color: var(--text-pri); font-size: 13px; letter-spacing: 0; }
.kl-near { background: rgba(255, 255, 255, 0.025); border-radius: 6px; }

.dn-timeline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
@media (max-width: 1100px) { .dn-timeline { grid-template-columns: 1fr; } }

.dn-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 14px 16px 10px;
    min-width: 0;
    transition: opacity .25s ease, border-color .25s ease;
}
.dn-block.dn-pending { opacity: 0.38; border-style: dashed; }
.dn-block.dn-current {
    border-color: rgba(110, 231, 183, 0.28);
    box-shadow: inset 3px 0 0 rgba(110, 231, 183, 0.55), 0 0 0 1px rgba(110, 231, 183, 0.06);
}
.dn-block-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}
.dn-block-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-sec);
}
.dn-block-when {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-dim);
}
.dn-facts {
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-sec);
    margin-bottom: 8px;
}
.dn-facts b { color: var(--text-pri); font-weight: 600; margin-right: 4px; }

.dn-pred {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    row-gap: 3px;
    padding: 9px 0 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.045);
    cursor: help;
}
.dn-pred:first-of-type { border-top: 0; }
.dn-pred-label { font-size: 12.5px; color: var(--text-pri); line-height: 1.3; }
.dn-pred-rate {
    font-family: 'JetBrains Mono', monospace;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    text-align: right;
    align-self: center;
}
.dn-lean-up   .dn-pred-rate { color: #6ee7b7; }
.dn-lean-down .dn-pred-rate { color: #fda4af; }
.dn-lean-flat .dn-pred-rate { color: var(--text-pri); }
.dn-pred-meta {
    grid-column: 1 / -1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--text-dim);
}
.dn-pred-bar {
    grid-column: 1 / -1;
    position: relative;
    height: 3px;
    margin-top: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.06);
    overflow: visible;
}
.dn-pred-bar span {
    position: absolute; left: 0; top: 0; bottom: 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.35);
}
.dn-lean-up   .dn-pred-bar span { background: rgba(110, 231, 183, 0.75); }
.dn-lean-down .dn-pred-bar span { background: rgba(253, 164, 175, 0.75); }
.dn-pred-bar i {
    position: absolute; top: -3px;
    width: 2px; height: 9px;
    margin-left: -1px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 1px;
}
.dn-thin { opacity: 0.55; }
.dn-resolved {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.07);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    line-height: 1.7;
    color: var(--text-dim);
}
.dn-resolved .dn-ok  { color: #6ee7b7; font-weight: 700; }
.dn-resolved .dn-no  { color: #fda4af; font-weight: 700; }
.dn-resolved .dn-sep { margin: 0 8px; opacity: 0.45; }
.dn-empty {
    font-size: 12px;
    font-style: italic;
    color: var(--text-dim);
    padding: 6px 0 4px;
}

/* Rich Text Editor Styles */
#notes-editor ul, #notes-editor ol { padding-left: 25px; margin: 10px 0; }
#notes-editor li { margin-bottom: 5px; list-style-position: outside; }

option { background-color: #1a1a2e !important; color: #e2e8f0 !important; }


/* Vector Markdown Chat Styles */
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    margin-bottom: 15px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    overflow: hidden;
}
.markdown-body th {
    background: rgba(147, 51, 234, 0.2);
    color: #c084fc;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid rgba(147, 51, 234, 0.3);
}
.markdown-body td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-main);
}
.markdown-body tr:last-child td {
    border-bottom: none;
}
.markdown-body p {
    margin-top: 0;
    margin-bottom: 10px;
}
.markdown-body strong {
    color: white;
}
.user-message-bubble {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 15px 20px;
    border-radius: 12px 0 12px 12px;
    color: white;
    line-height: 1.5;
}
.ai-message-bubble {
    background: rgba(147, 51, 234, 0.1);
    border: 1px solid rgba(147, 51, 234, 0.2);
    padding: 15px 20px;
    border-radius: 0 12px 12px 12px;
    color: var(--text-main);
    line-height: 1.6;
    width: 100%;
}

/* ---- the scorecard ---- */
.sc-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
@media (max-width: 1100px) { .sc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sc-tile {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 14px 11px;
    min-width: 0;
}
.sc-tile.sc-ok   { border-color: rgba(110, 231, 183, 0.35); }
.sc-tile.sc-warn { border-color: rgba(245, 165, 36, 0.4); }
.sc-tile.sc-bad  { border-color: rgba(253, 164, 175, 0.45); }
.sc-tile-l { font-size: 12.5px; color: var(--text-sec); line-height: 1.35; }
.sc-tile-v { font-family: 'JetBrains Mono', monospace; font-size: 30px; font-weight: 700; line-height: 1.1; margin: 6px 0 4px; color: var(--text-pri); }
.sc-ok   .sc-tile-v { color: #6ee7b7; }
.sc-warn .sc-tile-v { color: #f5a524; }
.sc-bad  .sc-tile-v { color: #fda4af; }
.sc-tile-m { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.sc-tile-help { margin-top: 8px; }
.sc-list { display: flex; flex-direction: column; }
.sc-row {
    display: grid;
    grid-template-columns: 110px 56px minmax(0, 1fr) 60px 150px;
    column-gap: 14px;
    align-items: baseline;
    padding: 7px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.045);
    font-size: 13px;
}
.sc-row.sc-head { border-top: 0; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.sc-date { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-sec); white-space: nowrap; }
.sc-side { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.sc-side-long  { color: #6ee7b7; }
.sc-side-short { color: #fda4af; }
.sc-what { color: var(--text-pri); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-pred { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text-sec); text-align: right; }
.sc-out { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; }
.sc-reached .sc-out { color: #6ee7b7; font-weight: 600; }
.sc-missed  .sc-out { color: #fda4af; }
@media (max-width: 1100px) { .sc-row { grid-template-columns: 90px 50px minmax(0, 1fr) 50px; } .sc-out { grid-column: 1 / -1; padding-left: 2px; } }

/* ---- header: two rows. Brand + tools on top, the pages underneath. ---- */
.site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.85rem 2rem 0;
}
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.header-right {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.header-right .refresh-btn { white-space: nowrap; }
/* the data range has room now: no truncation */
.subtitle, .subtitle > span { max-width: none; }
@media (max-width: 1100px) { .subtitle { max-width: none; } }
.otf-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-pri);
    white-space: nowrap;
    cursor: help;
}
.otf-pill-dot { width: 8px; height: 8px; border-radius: 50%; background: gray; box-shadow: 0 0 8px gray; flex-shrink: 0; }
.main-nav {
    display: flex;
    gap: 0.25rem;
    margin: 0.35rem 0 0 -0.75rem;
}
.main-nav .nav-btn {
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 0.55rem 0.85rem 0.6rem;
    color: var(--text-dim);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}
.main-nav .nav-btn:hover { color: var(--text-sec); }
.main-nav .nav-btn.active { color: var(--text-pri); border-bottom-color: var(--accent-blue); }
@media (max-width: 768px) { .site-header { text-align: left; } .main-nav { margin-left: -0.5rem; overflow-x: auto; } }

/* ---- Today's Read, tidied: chip headline, readable context, one list ---- */
.dn-headline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 19px; font-weight: 500; }
.dn-lean-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-sec);
    background: rgba(255, 255, 255, 0.04);
    margin-right: 4px;
}
.dn-headline.dn-up   .dn-lean-chip { color: #6ee7b7; border-color: rgba(110, 231, 183, 0.35); background: rgba(110, 231, 183, 0.08); }
.dn-headline.dn-down .dn-lean-chip { color: #fda4af; border-color: rgba(253, 164, 175, 0.35); background: rgba(253, 164, 175, 0.08); }
.dn-headline.dn-up, .dn-headline.dn-down { color: var(--text-pri); text-shadow: none; }
.dn-head-item b { font-weight: 700; }
.dn-head-sep { color: var(--text-dim); }
.dn-context { display: flex; flex-wrap: wrap; gap: 6px 8px; font-family: 'Inter', sans-serif; font-size: 12.5px; letter-spacing: 0; margin-top: 10px; }
.dn-ctx {
    padding: 3px 9px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-sec);
    white-space: nowrap;
}
.dn-ctx b { color: var(--text-pri); font-weight: 600; }
.dn-list {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 16px 12px;
    min-width: 0;
}
.dn-list-h {
    display: flex; justify-content: space-between;
    font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-dim); padding-bottom: 6px;
}
.dn-q { padding: 9px 0 8px; border-top: 1px solid rgba(255, 255, 255, 0.045); cursor: help; }
.dn-q-main { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 5px; }
.dn-q-label { font-size: 14.5px; color: var(--text-pri); }
.dn-q-rate { font-family: 'JetBrains Mono', monospace; font-size: 21px; font-weight: 700; line-height: 1; }
.dn-lean-up   .dn-q-rate { color: #6ee7b7; }
.dn-lean-down .dn-q-rate { color: #fda4af; }
.dn-lean-flat .dn-q-rate { color: var(--text-pri); }
.dn-q .dn-pred-bar { margin: 0 0 6px; }
.dn-q-why { font-size: 12.5px; color: var(--text-sec); line-height: 1.5; }
.dn-q-dim { color: var(--text-dim); }
.dn-thin .dn-q-rate { opacity: 0.6; }
.dn-next { margin-top: 10px; font-size: 12.5px; font-style: italic; color: var(--text-dim); }
.dn-answered {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
    margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(255, 255, 255, 0.08);
    font-size: 12.5px;
}
.dn-answered-l { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin-right: 2px; }
.dn-ans { white-space: nowrap; }
.dn-ans.dn-ok { color: #6ee7b7; }
.dn-ans.dn-no { color: var(--text-sec); }

/* =====================================================================
   LIVE MONITOR, rebuilt. One column, thin rules, no cards except the two
   trade panels. Mono for numbers, Inter for words.
   ===================================================================== */
.lv { display: flex; flex-direction: column; gap: 26px; padding: 22px 0 10px; }
.lv-h {
    display: flex; justify-content: space-between; align-items: baseline;
    font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text-dim); padding-bottom: 8px; margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.lv-h-r { letter-spacing: 0; text-transform: none; font-size: 11px; color: var(--text-dim); }
.lv-empty { font-size: 13.5px; font-style: italic; color: var(--text-dim); padding: 6px 0; }
.lv-note { font-size: 13.5px; color: #f5a524; padding: 8px 12px; border-radius: 8px; background: rgba(245, 165, 36, 0.08); border: 1px solid rgba(245, 165, 36, 0.25); }

/* 1. strip */
.lv-strip { display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.lv-price { font-family: 'JetBrains Mono', monospace; font-size: 40px; font-weight: 700; letter-spacing: -0.01em; color: var(--text-pri); line-height: 1; }
.lv-strip-items { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--text-sec); }
.lv-strip-item b { color: var(--text-pri); font-weight: 600; font-family: 'JetBrains Mono', monospace; }
.lv-sess { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; }
.lv-sess-asia    { color: var(--c-asia);   background: rgba(212, 168, 83, 0.12); }
.lv-sess-london  { color: var(--c-london); background: rgba(91, 141, 239, 0.14); }
.lv-sess-newyork { color: var(--c-ny);     background: rgba(67, 181, 129, 0.14); }
.lv-sess-close   { color: var(--c-close);  background: rgba(139, 149, 165, 0.14); }
.lv-otf { font-size: 13.5px; cursor: help; }
.lv-otf i { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; border: 1px solid currentColor; opacity: 0.85; margin-left: 2px; }
.lv-otf-up { color: #6ee7b7; }
.lv-otf-down { color: #fda4af; }
.lv-otf-flat { color: var(--text-dim); }
.lv-clock { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-dim); }

/* 2. read */
.lv-read-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 20px; color: var(--text-pri); }
.lv-lean {
    font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    padding: 5px 11px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.14); color: var(--text-sec); background: rgba(255, 255, 255, 0.04); margin-right: 4px;
}
.lv-lean-up   .lv-lean { color: #6ee7b7; border-color: rgba(110, 231, 183, 0.35); background: rgba(110, 231, 183, 0.08); }
.lv-lean-down .lv-lean { color: #fda4af; border-color: rgba(253, 164, 175, 0.35); background: rgba(253, 164, 175, 0.08); }
.lv-read-item b { font-weight: 700; }
.lv-sep { color: var(--text-dim); }
.lv-dim { color: var(--text-sec); font-size: 16px; }
.lv-facts { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 12px; }
.lv-fact { font-size: 13px; padding: 4px 10px; border-radius: 100px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.03); color: var(--text-sec); white-space: nowrap; }
.lv-fact b { color: var(--text-pri); font-weight: 600; }

/* 3. levels beside the trade */
.lv-main { display: grid; grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.5fr); gap: 28px; align-items: start; }
@media (max-width: 1100px) { .lv-main { grid-template-columns: 1fr; } }
.lv-col { min-width: 0; }
.lv-plan { display: flex; flex-direction: column; gap: 14px; }
.lv .kl-row { grid-template-columns: minmax(0, 1fr) minmax(120px, 150px) auto auto; column-gap: 14px; padding: 9px 4px; font-size: 14px; }
.lv .kl-price { font-size: 14px; }
.lv .kl-dist { font-size: 12px; }
.lv .kl-hit-rate { font-size: 15px; }
.lv .kl-hit-meta { font-size: 11px; }
.lv .kl-now { font-size: 12.5px; }

/* 4. still open */
.lv-qs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; }
@media (max-width: 1100px) { .lv-qs { grid-template-columns: 1fr; } }
.lv-q { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 12px; align-items: start; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.045); cursor: help; }
.lv-q-rate { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 700; line-height: 1.1; text-align: right; }
.lv-lean-up   .lv-q-rate { color: #6ee7b7; }
.lv-lean-down .lv-q-rate { color: #fda4af; }
.lv-lean-flat .lv-q-rate { color: var(--text-pri); }
.lv-thin .lv-q-rate { opacity: 0.55; }
.lv-q-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lv-q-label { font-size: 14.5px; color: var(--text-pri); }
.lv-q-why { font-size: 12.5px; color: var(--text-dim); line-height: 1.45; }
.lv-answered { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; font-size: 13px; }
.lv-answered-l { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.lv-ans { white-space: nowrap; }
.lv-ans.lv-ok { color: #6ee7b7; }
.lv-ans.lv-no { color: var(--text-sec); }

/* 5. trust */
.lv-score-box summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 26px; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.07); border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.lv-score-box summary::-webkit-details-marker { display: none; }
.lv-score-title { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin-right: 6px; }
.lv-score-item { display: inline-flex; align-items: baseline; gap: 7px; font-size: 13px; color: var(--text-sec); }
.lv-score-item b { font-family: 'JetBrains Mono', monospace; font-size: 17px; font-weight: 700; color: var(--text-pri); }
.lv-score-item b.lv-ok { color: #6ee7b7; }
.lv-score-item b.lv-warn { color: #f5a524; }
.lv-score-item b.lv-bad { color: #fda4af; }
.lv-score-exp { font-size: 11.5px; color: var(--text-dim); }
.lv-score-n { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-dim); }
.lv-score-box[open] summary { border-bottom-color: transparent; }
.lv-score-box .sc-list { padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }

/* help */
.lv-help summary { cursor: pointer; font-size: 12.5px; color: var(--text-dim); list-style: none; }
.lv-help summary::-webkit-details-marker { display: none; }
.lv-help summary::before { content: "?  "; font-family: 'JetBrains Mono', monospace; }
.lv-help[open] summary { color: var(--text-sec); margin-bottom: 8px; }
.lv-help p { font-size: 13px; line-height: 1.65; color: var(--text-sec); margin: 0 0 10px; max-width: 110ch; }
.lv-help p b { color: var(--text-pri); }

/* ---- Live Monitor, second pass: the Dashboard's stats conditioned on OTF ---- */
.lv-strip { display: block; padding-bottom: 14px; }
.lv-strip-row { display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; }
.lv-pop { margin-top: 10px; font-size: 13px; color: var(--text-sec); }
.lv-pop b { color: var(--text-pri); font-weight: 600; }
.lv-block { min-width: 0; }
.lv-h-sub { margin-top: 18px; }

/* session tiles */
.lv-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .lv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lv-tile {
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 12px 14px 10px;
    background: rgba(255, 255, 255, 0.02);
    min-width: 0;
}
.lv-tile-live { border-color: rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.035); }
.lv-tile-ahead { opacity: 0.7; }
.lv-tile-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.lv-tile-state { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.lv-tile-live .lv-tile-state { color: var(--text-pri); }
.lv-tile-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; color: var(--text-sec); padding: 3px 0; }
.lv-tile-row b { font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 700; color: var(--text-pri); white-space: nowrap; }
.lv-tile-dim { color: var(--text-dim); font-size: 12px; }
.lv-tile-dim b { font-size: 13px; color: var(--text-sec); font-weight: 600; }
.lv-tile-today { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 9px; padding-top: 8px; border-top: 1px dashed rgba(255, 255, 255, 0.08); }
.lv-tile-today span { font-size: 11.5px; color: #f5a524; padding: 2px 7px; border-radius: 100px; background: rgba(245, 165, 36, 0.08); border: 1px solid rgba(245, 165, 36, 0.25); white-space: nowrap; }

/* charts */
.lv-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 1100px) { .lv-charts { grid-template-columns: 1fr; } }
.lv-chart { min-width: 0; }
.lv-chart-t { font-size: 13px; color: var(--text-sec); margin: 6px 0 6px; }
.lv-chart-box { position: relative; height: 180px; }
.lv-chart-box-s { height: 130px; }
.lv-chart-box canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.lv-chart-note { font-size: 12.5px; color: var(--text-sec); line-height: 1.55; margin-top: 8px; }
.lv-chart-note b { color: var(--text-pri); font-weight: 600; font-family: 'JetBrains Mono', monospace; }

/* level hit-rates */
.lv-hitrates { display: flex; flex-direction: column; }
.lv-hr { padding: 10px 0 9px; border-bottom: 1px solid rgba(255, 255, 255, 0.045); }
.lv-hr-main { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.lv-hr-t { font-size: 14.5px; color: var(--text-pri); }
.lv-hr-px { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text-sec); margin-left: 6px; }
.lv-hr-rate { font-family: 'JetBrains Mono', monospace; font-size: 21px; font-weight: 700; line-height: 1; }
.lv-hr-hi { color: #6ee7b7; }
.lv-hr-mid { color: var(--text-pri); }
.lv-hr-lo { color: var(--text-dim); }
.lv-hr-sub { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 12.5px; }
.lv-hr-status { color: var(--text-sec); }
.lv-hr-status.lv-ok { color: #6ee7b7; }
.lv-hr-why { color: var(--text-dim); }
.lv-hr-status b { color: #f5a524; font-weight: 600; }

/* weekday tiles */
.lv-wtiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .lv-wtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lv-wtile { border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 10px; padding: 12px 14px 11px; background: rgba(255, 255, 255, 0.02); min-width: 0; }
.lv-wtile-l { font-size: 12.5px; color: var(--text-sec); }
.lv-wtile-v { font-family: 'JetBrains Mono', monospace; font-size: 26px; font-weight: 700; color: var(--text-pri); line-height: 1.15; margin: 5px 0 3px; }
.lv-wtile-s { font-size: 11.5px; color: var(--text-dim); }
