:root {
    --bg: #050b12;
    --surface: rgba(10, 20, 32, 0.88);
    --surface-2: rgba(16, 30, 48, 0.78);
    --surface-glass: rgba(8, 17, 29, 0.72);
    --surface-elevated: rgba(18, 34, 54, 0.82);
    --border: rgba(112, 159, 214, 0.28);
    --border-strong: rgba(143, 184, 232, 0.42);
    --blue-glow: rgba(91, 141, 239, 0.45);
    --glass-highlight: rgba(255, 255, 255, 0.08);
    --text: #f3f7fb;
    --muted: #9fb2c8;
    --soft: #dbe8f6;
    --gold: #d6a84f;
    --gold-soft: #f0c766;
    --green: #7ee787;
    --lime: #84cc16;
    --red: #e05263;
    --orange: #f97316;
    --blue: #5b8def;
    --slate: #64748b;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
    --panel-shadow: 0 20px 55px rgba(0, 0, 0, 0.4), 0 0 34px rgba(91, 141, 239, 0.08);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 0%, rgba(91, 141, 239, 0.22), transparent 34%),
        radial-gradient(circle at 82% 8%, rgba(214, 168, 79, 0.12), transparent 28%),
        linear-gradient(145deg, #03070d 0%, #07111d 46%, #02050a 100%);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 76%);
}

button,
select {
    font: inherit;
}

.dashboard-shell {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 44px;
}

.dashboard-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.09), transparent 31%),
        radial-gradient(circle at 12% 0%, rgba(91, 141, 239, 0.16), transparent 42%),
        rgba(8, 17, 29, 0.76);
    box-shadow: var(--panel-shadow);
    backdrop-filter: blur(18px);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(1.85rem, 3vw, 3rem);
    letter-spacing: 0;
    line-height: 1.05;
    text-shadow: 0 0 26px rgba(91, 141, 239, 0.14);
}

.subtitle {
    margin: 8px 0 0;
    color: var(--muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.timestamp {
    min-width: 178px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(7, 18, 31, 0.72);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.025) inset;
}

.market-control {
    min-width: 190px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(7, 18, 31, 0.72);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.025) inset;
}

.market-control label {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.market-control select {
    width: 100%;
    min-height: 30px;
    margin-top: 5px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(16, 30, 48, 0.92);
    color: var(--text);
}

.timestamp span {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
}

.timestamp strong {
    display: block;
    color: var(--soft);
    font-size: 0.9rem;
}

.refresh-button,
.sample-button {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #b88a37;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold-soft), var(--gold));
    color: #111821;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(214, 168, 79, 0.26), 0 0 0 1px rgba(255, 255, 255, 0.16) inset;
}

.sample-button {
    border-color: var(--border);
    background: rgba(16, 30, 48, 0.78);
    color: var(--soft);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.025) inset;
}

.refresh-button:disabled,
.sample-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.status-banner {
    min-height: 44px;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background:
        linear-gradient(135deg, rgba(91, 141, 239, 0.12), transparent 35%),
        rgba(6, 15, 26, 0.72);
    color: var(--muted);
    box-shadow: 0 0 28px rgba(91, 141, 239, 0.08);
    backdrop-filter: blur(14px);
}

.status-banner::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--blue);
    box-shadow: 0 0 16px var(--blue-glow);
}

.status-banner.is-error {
    border-color: rgba(224, 82, 99, 0.55);
    color: #ffc6cf;
}

.status-banner.is-ready {
    color: #bdeed8;
}

.status-banner.is-ready::before {
    background: var(--green);
    box-shadow: 0 0 16px rgba(126, 231, 135, 0.45);
}

.status-banner.is-error::before {
    background: var(--red);
    box-shadow: 0 0 16px rgba(255, 95, 109, 0.45);
}

.workspace-nav {
    position: sticky;
    top: 14px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin-bottom: 22px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.085), transparent 34%),
        rgba(6, 14, 24, 0.78);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(255, 255, 255, 0.03) inset, 0 0 34px rgba(91, 141, 239, 0.13);
    backdrop-filter: blur(18px);
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 245px;
    padding: 4px 10px;
}

.brand-mark {
    position: relative;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border: 1px solid rgba(240, 199, 102, 0.58);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(240, 199, 102, 0.98), rgba(142, 98, 32, 0.76)),
        radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.8), transparent 35%);
    box-shadow: 0 0 22px rgba(214, 168, 79, 0.32);
}

.brand-mark::after {
    content: "";
    position: absolute;
    inset: 9px;
    border-top: 2px solid #06111d;
    border-right: 2px solid #06111d;
    transform: rotate(45deg);
}

.app-brand strong,
.app-brand span {
    display: block;
}

.app-brand strong {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 900;
}

.app-brand span {
    color: var(--gold-soft);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.workspace-tabs {
    display: inline-flex;
    padding: 4px;
    border: 1px solid rgba(112, 159, 214, 0.24);
    border-radius: 999px;
    background: rgba(5, 12, 22, 0.72);
}

.workspace-nav button {
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 800;
}

.workspace-nav button.is-active {
    background: linear-gradient(135deg, var(--gold-soft), var(--gold));
    color: #111821;
    box-shadow: 0 8px 24px rgba(214, 168, 79, 0.28);
}

.decision-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    overflow: hidden;
    margin-bottom: 18px;
    border: 0;
    background: transparent;
    box-shadow: var(--shadow);
}

.fx-disclaimer {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(214, 168, 79, 0.5);
    background: rgba(214, 168, 79, 0.1);
    color: var(--soft);
}

.fx-disclaimer p {
    margin: 0;
}

.fx-disclaimer p + p {
    margin-top: 6px;
}

.decision-item {
    min-height: 86px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 38%),
        var(--surface);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22), 0 0 22px rgba(91, 141, 239, 0.06);
}

.decision-item span,
.decision-item label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.decision-item strong {
    display: inline-flex;
    color: var(--text);
    font-size: 1.08rem;
}

.semantic-chip,
.legend-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 26px;
    padding: 3px 9px;
    border: 1px solid transparent;
    font-weight: 800;
}

.bias-bullish {
    color: #eaffd0;
    background: rgba(132, 204, 22, 0.18);
    border-color: rgba(132, 204, 22, 0.46);
}

.bias-bearish {
    color: #ffd1d7;
    background: rgba(224, 82, 99, 0.18);
    border-color: rgba(224, 82, 99, 0.46);
}

.bias-neutral {
    color: #ffe8b0;
    background: rgba(214, 168, 79, 0.18);
    border-color: rgba(214, 168, 79, 0.46);
}

.confidence-high {
    color: #c9f7df;
    background: rgba(54, 179, 126, 0.18);
    border-color: rgba(54, 179, 126, 0.46);
}

.confidence-moderate {
    color: #ffe8b0;
    background: rgba(214, 168, 79, 0.18);
    border-color: rgba(214, 168, 79, 0.46);
}

.confidence-low {
    color: #ffdbc2;
    background: rgba(249, 115, 22, 0.18);
    border-color: rgba(249, 115, 22, 0.46);
}

.confidence-no-trade {
    color: #d8dee8;
    background: rgba(100, 116, 139, 0.2);
    border-color: rgba(100, 116, 139, 0.5);
}

.structure-item select {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    padding: 0 10px;
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.weekly-outlook {
    margin-bottom: 18px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.weekly-outlook-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-bottom: 1px solid var(--border);
    background: #0f1620;
}

.weekly-outlook-header h2 {
    margin: 0;
    font-size: 1.35rem;
}

.outlook-structure {
    min-width: 180px;
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.outlook-structure span,
.outlook-grid span,
.outlook-detail-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.outlook-structure strong,
.outlook-grid strong {
    display: block;
    margin-top: 4px;
}

.outlook-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    border-bottom: 1px solid var(--border);
    background: var(--border);
}

.outlook-grid div {
    padding: 14px 16px;
    background: var(--surface);
}

.outlook-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--border);
}

.outlook-detail-grid div {
    min-height: 104px;
    padding: 14px 16px;
    background: var(--surface);
}

.outlook-detail-grid p {
    margin: 8px 0 0;
    color: var(--soft);
}

.detailed-playbook {
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.detailed-playbook summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: var(--gold);
    cursor: pointer;
    font-weight: 800;
}

.legend-section {
    margin-bottom: 18px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.legend-panel summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: var(--gold);
    cursor: pointer;
    font-weight: 800;
    border-bottom: 1px solid var(--border);
    background: #0f1620;
}

.legend-intro {
    margin: 0;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--soft);
    background: var(--surface);
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--border);
}

.legend-grid > div {
    padding: 16px;
    background: var(--surface);
}

.legend-grid h3 {
    margin: 0 0 12px;
    color: var(--soft);
    font-size: 0.95rem;
}

.legend-mini-intro {
    margin: 0 0 12px;
    color: var(--muted);
}

.legend-grid dl {
    margin: 0;
}

.legend-grid dt {
    margin-top: 10px;
    color: var(--text);
    font-weight: 800;
}

.legend-grid dt:first-child {
    margin-top: 0;
}

.legend-grid dd {
    margin: 4px 0 0;
    color: var(--muted);
}

.legend-note {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-left: 3px solid var(--gold);
    background: var(--surface-2);
    color: var(--soft);
}

.panel {
    min-width: 0;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 15px 16px;
    border-bottom: 1px solid var(--border);
    background: #0f1620;
}

.panel-number {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(214, 168, 79, 0.5);
    color: var(--gold);
    font-weight: 800;
}

.panel h2 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0;
}

.metric-table,
.detail-list,
.structure-panel,
.playbook-content {
    padding: 16px;
}

.panel-helper {
    margin: 0;
    padding: 12px 16px 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.metric-row {
    display: grid;
    grid-template-columns: minmax(130px, 1.2fr) repeat(3, minmax(80px, 1fr));
    gap: 12px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid rgba(38, 50, 65, 0.7);
}

.metric-row:last-child {
    border-bottom: 0;
}

.metric-row.header {
    padding-top: 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.metric-name {
    color: var(--soft);
    font-weight: 700;
}

.metric-value,
.detail-value {
    color: var(--text);
    font-weight: 700;
}

.positive {
    color: var(--green);
}

.negative {
    color: var(--red);
}

.neutral {
    color: var(--gold);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(38, 50, 65, 0.7);
}

.detail-row:last-child {
    border-bottom: 0;
}

.detail-label {
    color: var(--muted);
}

.detail-value {
    text-align: right;
}

.reason-list,
.playbook-list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.reason-list li,
.playbook-list li {
    margin-top: 8px;
    padding: 10px 12px;
    border-left: 3px solid var(--blue);
    background: var(--surface-2);
    color: var(--soft);
}

.structure-panel p {
    margin: 0 0 14px;
    color: var(--muted);
}

.segmented-control {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.segmented-control button {
    min-height: 42px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--soft);
    cursor: pointer;
}

.segmented-control button.is-active {
    border-color: var(--gold);
    color: var(--text);
    background: rgba(214, 168, 79, 0.14);
}

.playbook-panel {
    grid-column: span 2;
}

.playbook-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.playbook-summary div {
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.playbook-summary span {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.playbook-summary strong {
    display: block;
    margin-top: 4px;
}

.playbook-section {
    margin-top: 14px;
}

.playbook-section h3 {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
}

.playbook-text {
    margin: 0;
    padding: 12px;
    background: var(--surface-2);
    color: var(--soft);
}

.diagnostics-section {
    margin-top: 18px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.diagnostics-panel summary {
    min-height: 52px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: var(--gold);
    cursor: pointer;
    font-weight: 800;
    border-bottom: 1px solid var(--border);
    background: #0f1620;
}

.diagnostics-content {
    padding: 16px;
}

.diagnostic-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.diagnostic-summary.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.diagnostic-summary div {
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.diagnostic-summary span {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.diagnostic-summary strong {
    display: block;
    margin-top: 4px;
}

.diagnostic-block {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    background: rgba(21, 31, 43, 0.62);
}

.diagnostic-block h3 {
    margin: 0 0 8px;
    color: var(--soft);
    font-size: 0.92rem;
}

.diagnostic-block p {
    margin: 8px 0 0;
    color: var(--muted);
}

.diagnostic-conditions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.diagnostic-condition {
    padding: 11px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.diagnostic-condition span {
    display: inline-flex;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.diagnostic-condition strong {
    display: block;
    color: var(--soft);
}

.diagnostic-condition.passed {
    border-color: rgba(54, 179, 126, 0.4);
}

.diagnostic-condition.failed {
    opacity: 0.72;
}

.diagnostic-rule-list details {
    margin-top: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.diagnostic-rule-list summary {
    min-height: 42px;
    padding: 10px 12px;
    color: var(--soft);
    cursor: pointer;
}

.analytics-section {
    margin-top: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.cross-workspace {
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.cross-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-bottom: 1px solid var(--border);
    background: #0f1620;
}

.cross-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.cross-header p {
    margin: 6px 0 0;
    color: var(--muted);
}

.cross-controls {
    min-width: 260px;
    display: grid;
    gap: 8px;
}

.cross-controls label {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.cross-controls select {
    min-height: 38px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
}

.cross-controls .refresh-button,
.cross-controls .sample-button {
    width: 100%;
}

.cross-controls button:disabled,
.cross-controls select:disabled {
    cursor: wait;
    opacity: 0.62;
}

.cross-workspace .history-status {
    margin: 16px;
}

.cross-context-output {
    padding: 0 16px 16px;
}

.cross-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.cross-card {
    border: 1px solid var(--border);
    background: var(--surface-2);
    padding: 14px;
}

.cross-card.wide {
    grid-column: span 2;
}

.cross-card h3 {
    margin: 0 0 12px;
    color: var(--soft);
    font-size: 0.95rem;
}

.cross-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.cross-card-heading h3 {
    margin: 0;
}

.mode-badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mode-badge.live {
    border-color: rgba(91, 211, 167, 0.55);
    color: #bdeed8;
}

.mode-badge.sample {
    border-color: rgba(230, 190, 92, 0.55);
    color: #f1d895;
}

.mode-badge.mixed {
    border-color: rgba(241, 141, 84, 0.55);
    color: #ffc19a;
}

.cross-warning {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(230, 190, 92, 0.45);
    border-radius: 8px;
    background: rgba(230, 190, 92, 0.08);
    color: #f1d895;
}

.cross-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

.analytics-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-bottom: 1px solid var(--border);
    background: #0f1620;
}

.analytics-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.analytics-header p {
    margin: 6px 0 0;
    color: var(--muted);
}

.history-status {
    max-width: 420px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.9rem;
}

.history-status.is-error {
    border-color: rgba(224, 82, 99, 0.55);
    color: #ffc6cf;
}

.history-status.is-ready {
    color: #bdeed8;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 16px;
}

.chart-panel {
    min-width: 0;
    border: 1px solid var(--border);
    background: var(--surface-2);
    padding: 14px;
}

.chart-panel h3 {
    margin: 0 0 12px;
    color: var(--soft);
    font-size: 0.95rem;
}

.chart-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.chart-panel-header h3 {
    margin: 0;
}

.chart-toggle {
    display: inline-flex;
    border: 1px solid var(--border);
    background: #0f1620;
}

.chart-toggle button {
    min-width: 44px;
    min-height: 30px;
    border: 0;
    border-right: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.chart-toggle button:last-child {
    border-right: 0;
}

.chart-toggle button.is-active {
    color: #111821;
    background: var(--gold);
    font-weight: 800;
}

.chart-panel canvas {
    display: block;
    width: 100%;
    height: 300px;
}

.wide-chart {
    grid-column: span 2;
}

@media (max-width: 980px) {
    .dashboard-header {
        align-items: stretch;
        flex-direction: column;
    }

    .decision-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .panel-grid {
        grid-template-columns: 1fr;
    }

    .weekly-outlook-header {
        align-items: stretch;
        flex-direction: column;
    }

    .outlook-grid,
    .outlook-detail-grid,
    .legend-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .playbook-panel {
        grid-column: span 1;
    }

    .playbook-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .diagnostic-summary,
    .diagnostic-conditions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .analytics-header {
        align-items: stretch;
        flex-direction: column;
    }

    .cross-header {
        align-items: stretch;
        flex-direction: column;
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }

    .chart-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .wide-chart {
        grid-column: span 1;
    }
}

@media (max-width: 620px) {
    .dashboard-shell {
        width: min(100% - 20px, 1440px);
        padding-top: 16px;
    }

    .header-actions,
    .workspace-nav,
    .decision-strip,
    .outlook-grid,
    .outlook-detail-grid,
    .legend-grid,
    .diagnostic-summary,
    .diagnostic-conditions,
    .playbook-summary,
    .segmented-control {
        grid-template-columns: 1fr;
    }

    .header-actions {
        display: grid;
    }

    .metric-row {
        grid-template-columns: 1fr 1fr;
    }

    .cross-card-grid {
        grid-template-columns: 1fr;
    }

    .cross-card.wide {
        grid-column: span 1;
    }

    .metric-row.header {
        display: none;
    }
}

/* Premium visual layer: presentation-only overrides. */
.weekly-outlook,
.legend-section,
.panel,
.diagnostics-section,
.analytics-section,
.cross-workspace {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.065), transparent 34%),
        var(--surface-glass);
    box-shadow: var(--panel-shadow);
    backdrop-filter: blur(16px);
}

.weekly-outlook-header,
.legend-panel summary,
.panel-header,
.diagnostics-panel summary,
.analytics-header,
.cross-header {
    border-bottom: 1px solid var(--border);
    background:
        linear-gradient(135deg, rgba(91, 141, 239, 0.13), transparent 38%),
        rgba(7, 17, 29, 0.86);
}

.analytics-header,
.cross-header {
    position: relative;
}

.analytics-header::before,
.cross-header::before {
    content: "";
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border: 1px solid rgba(240, 199, 102, 0.42);
    border-radius: 12px;
    background:
        radial-gradient(circle at 34% 28%, rgba(240, 199, 102, 0.72), transparent 32%),
        rgba(214, 168, 79, 0.12);
    box-shadow: 0 0 18px rgba(214, 168, 79, 0.12);
}

.weekly-outlook-header h2,
.analytics-header h2,
.cross-header h2,
.panel h2,
.legend-grid h3,
.chart-panel h3,
.cross-card h3 {
    color: var(--text);
    font-weight: 800;
}

.panel-number {
    border-radius: 10px;
    background: rgba(214, 168, 79, 0.12);
    box-shadow: 0 0 16px rgba(214, 168, 79, 0.12);
}

.outlook-structure,
.outlook-grid div,
.outlook-detail-grid div,
.legend-grid > div,
.diagnostic-card,
.diagnostic-rule-list details,
.chart-panel,
.cross-card {
    border: 1px solid rgba(112, 159, 214, 0.22);
    border-radius: var(--radius-md);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 36%),
        var(--surface-2);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.metric-table,
.detail-list,
.playbook-content,
.diagnostics-content {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 38%),
        rgba(8, 17, 29, 0.42);
}

.outlook-grid,
.outlook-detail-grid,
.legend-grid {
    gap: 12px;
    padding: 16px;
    background: transparent;
}

.detailed-playbook,
.legend-panel,
.diagnostics-panel {
    background: transparent;
}

.detailed-playbook summary,
.legend-panel summary,
.diagnostics-panel summary {
    color: var(--gold-soft);
    background:
        linear-gradient(135deg, rgba(214, 168, 79, 0.08), transparent 34%),
        rgba(7, 17, 29, 0.86);
}

.semantic-chip,
.legend-chip,
.mode-badge {
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.035) inset;
}

.metric-row,
.detail-row {
    border-bottom-color: rgba(112, 159, 214, 0.17);
}

.reason-list li,
.playbook-list li,
.legend-note {
    border-radius: 10px;
    border-left-color: var(--gold);
    background: rgba(16, 30, 48, 0.68);
}

.chart-panel {
    padding: 16px;
}

.chart-panel canvas {
    border-radius: 12px;
}

.cross-workspace {
    margin-top: 4px;
}

.cross-controls select {
    min-height: 42px;
    border-radius: 12px;
    background: rgba(9, 20, 34, 0.9);
}

.cross-card {
    position: relative;
}

.cross-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: 0 0 28px rgba(91, 141, 239, 0.08) inset;
}

.detail-label,
.metric-row.header,
.outlook-structure span,
.outlook-grid span,
.outlook-detail-grid span,
.cross-controls label {
    color: var(--muted);
}

button:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--gold-soft);
    outline-offset: 3px;
}

@media (max-width: 760px) {
    .workspace-nav {
        position: static;
        align-items: stretch;
    }

    .app-brand {
        min-width: 0;
    }

    .workspace-tabs {
        width: 100%;
    }

    .workspace-tabs button {
        flex: 1;
        padding: 0 10px;
    }
}

/* Version B refinement layer: larger cinematic shell, premium nav, and richer illuminated glass. */
body {
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% -8%, rgba(72, 136, 234, 0.28), transparent 31%),
        radial-gradient(circle at 72% 0%, rgba(214, 168, 79, 0.15), transparent 24%),
        radial-gradient(circle at 50% 42%, rgba(44, 94, 158, 0.13), transparent 38%),
        linear-gradient(180deg, #02050a 0%, #06101c 44%, #020509 100%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.028), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.02)),
        radial-gradient(circle at 7% 18%, rgba(91, 141, 239, 0.18), transparent 30%),
        radial-gradient(circle at 88% 20%, rgba(91, 141, 239, 0.1), transparent 24%);
    mix-blend-mode: screen;
    opacity: 0.75;
}

.dashboard-shell {
    width: 100%;
    max-width: none;
    padding: 0 0 64px;
}

.workspace-nav {
    top: 0;
    min-height: 86px;
    margin: 0 0 44px;
    padding: 0 38px;
    border-width: 0 0 1px;
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(10, 20, 34, 0.98), rgba(3, 8, 15, 0.9)),
        radial-gradient(circle at 20% 0%, rgba(91, 141, 239, 0.2), transparent 34%);
    box-shadow:
        0 22px 60px rgba(0, 0, 0, 0.42),
        0 1px 0 rgba(126, 177, 238, 0.26),
        0 0 54px rgba(91, 141, 239, 0.16);
}

.app-brand {
    min-width: 330px;
    gap: 16px;
    padding: 0;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 0;
    clip-path: polygon(50% 0, 92% 25%, 92% 75%, 50% 100%, 8% 75%, 8% 25%);
    background:
        linear-gradient(135deg, rgba(251, 216, 121, 0.96), rgba(164, 110, 31, 0.72)),
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.82), transparent 34%);
    box-shadow:
        0 0 0 1px rgba(240, 199, 102, 0.45) inset,
        0 0 34px rgba(214, 168, 79, 0.3);
}

.brand-mark::before {
    content: "";
    position: absolute;
    inset: 9px;
    clip-path: inherit;
    border: 2px solid rgba(5, 13, 23, 0.82);
}

.brand-mark::after {
    inset: 18px;
    border-top: 3px solid #07111d;
    border-right: 3px solid #07111d;
}

.app-brand strong {
    font-family: "Cormorant Garamond", Georgia, serif;
    color: #fff7df;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 0.9;
    text-shadow: 0 0 24px rgba(240, 199, 102, 0.16);
}

.app-brand span {
    margin-top: 5px;
    color: var(--gold-soft);
    font-size: 0.86rem;
    letter-spacing: 0.18em;
}

.workspace-tabs {
    height: 86px;
    margin: 0 auto;
    padding: 0;
    gap: 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.workspace-nav button {
    position: relative;
    min-width: 250px;
    min-height: 82px;
    padding: 0 32px;
    border: 1px solid transparent;
    border-radius: 10px 10px 0 0;
    color: rgba(223, 233, 245, 0.78);
    font-size: 1.04rem;
    font-weight: 800;
    gap: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.workspace-nav button.is-active {
    border-color: rgba(139, 187, 246, 0.56);
    border-bottom-color: rgba(240, 199, 102, 0.95);
    background:
        radial-gradient(circle at 30% 0%, rgba(91, 141, 239, 0.33), transparent 42%),
        linear-gradient(180deg, rgba(21, 41, 68, 0.92), rgba(8, 18, 31, 0.86));
    color: var(--text);
    box-shadow:
        0 4px 0 rgba(240, 199, 102, 0.95),
        0 20px 54px rgba(91, 141, 239, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.nav-icon {
    width: 28px;
    height: 28px;
    display: inline-block;
    position: relative;
    color: var(--gold-soft);
}

.market-icon::before,
.market-icon::after {
    content: "";
    position: absolute;
    left: 3px;
    right: 3px;
    border-bottom: 3px solid currentColor;
    transform: skewY(-24deg);
}

.market-icon::before {
    top: 17px;
}

.market-icon::after {
    top: 8px;
    width: 16px;
    margin-left: auto;
}

.cross-icon::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 2px dotted rgba(159, 178, 200, 0.72);
    border-radius: 999px;
}

.cross-icon::after {
    content: "";
    position: absolute;
    inset: 11px;
    border-radius: 999px;
    background: rgba(159, 178, 200, 0.72);
    box-shadow:
        0 -12px 0 rgba(159, 178, 200, 0.62),
        11px 7px 0 rgba(159, 178, 200, 0.62),
        -11px 7px 0 rgba(159, 178, 200, 0.62);
}

.nav-tools {
    min-width: 150px;
    display: inline-flex;
    justify-content: flex-end;
    gap: 18px;
}

.nav-tools span {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(197, 213, 232, 0.6);
    border-radius: 999px;
    color: rgba(223, 233, 245, 0.88);
    font-weight: 900;
    box-shadow: 0 0 22px rgba(91, 141, 239, 0.1);
}

.dashboard-header,
.status-banner,
#market-workspace,
.cross-workspace {
    width: min(1540px, calc(100% - 72px));
    margin-left: auto;
    margin-right: auto;
}

.dashboard-header {
    min-height: 250px;
    align-items: center;
    margin-bottom: 26px;
    padding: 44px 42px;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.dashboard-header > div:first-child {
    max-width: 780px;
}

h1 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(3.6rem, 5.5vw, 5.9rem);
    font-weight: 700;
    line-height: 0.88;
    color: #fff6e5;
    text-shadow:
        0 0 42px rgba(91, 141, 239, 0.16),
        0 14px 46px rgba(0, 0, 0, 0.42);
}

.subtitle {
    margin-top: 18px;
    color: rgba(223, 233, 245, 0.72);
    font-size: 1.12rem;
}

.eyebrow {
    color: var(--gold-soft);
    font-size: 0.82rem;
}

.header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 18px;
}

.market-control,
.timestamp {
    min-width: 220px;
    min-height: 128px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px;
    border-color: rgba(139, 187, 246, 0.48);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 40%),
        rgba(5, 14, 25, 0.78);
    box-shadow:
        0 16px 42px rgba(0, 0, 0, 0.34),
        0 0 34px rgba(91, 141, 239, 0.16),
        0 0 0 1px rgba(255, 255, 255, 0.035) inset;
}

.market-control label,
.timestamp span {
    color: var(--gold-soft);
    font-size: 0.82rem;
}

.market-control select {
    min-height: 48px;
    margin-top: 10px;
    padding: 0 14px;
    border-radius: 8px;
    border-color: rgba(139, 187, 246, 0.46);
    background: rgba(7, 16, 29, 0.86);
    color: var(--text);
    font-size: 1.02rem;
}

.timestamp strong {
    margin-top: 10px;
    color: var(--text);
    font-size: 1.08rem;
}

.refresh-button,
.sample-button {
    min-height: 72px;
    padding: 0 30px;
    border-radius: 10px;
    font-weight: 900;
}

.refresh-button {
    border-color: rgba(176, 123, 42, 0.92);
    background:
        linear-gradient(135deg, #ffe39a 0%, #d8a749 55%, #b97922 100%);
    box-shadow:
        0 20px 42px rgba(214, 168, 79, 0.32),
        0 0 26px rgba(240, 199, 102, 0.16),
        0 0 0 1px rgba(255, 255, 255, 0.28) inset;
}

.sample-button {
    border-color: rgba(139, 187, 246, 0.42);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 40%),
        rgba(8, 21, 37, 0.82);
    color: rgba(223, 233, 245, 0.9);
    box-shadow:
        0 14px 32px rgba(0, 0, 0, 0.28),
        0 0 24px rgba(91, 141, 239, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.035) inset;
}

.status-banner {
    min-height: 86px;
    margin-bottom: 18px;
    padding: 0 34px;
    border-color: rgba(139, 187, 246, 0.64);
    border-radius: 14px;
    background:
        radial-gradient(circle at 5% 50%, rgba(91, 141, 239, 0.28), transparent 22%),
        linear-gradient(135deg, rgba(91, 141, 239, 0.2), transparent 44%),
        rgba(5, 14, 25, 0.82);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 0 48px rgba(91, 141, 239, 0.44),
        0 18px 48px rgba(0, 0, 0, 0.36);
    font-size: 1.08rem;
}

.status-banner::before {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(139, 187, 246, 0.6);
    background:
        radial-gradient(circle, var(--green) 0 11%, transparent 13%),
        radial-gradient(circle, transparent 0 38%, rgba(91, 141, 239, 0.5) 40% 45%, transparent 47%),
        rgba(10, 25, 44, 0.9);
}

.status-banner.is-ready #status-text::first-letter {
    color: var(--green);
}

#market-workspace {
    display: block;
}

.weekly-outlook,
.legend-section,
.panel,
.diagnostics-section,
.analytics-section,
.cross-workspace {
    border-color: rgba(139, 187, 246, 0.42);
    border-radius: 14px;
    background:
        radial-gradient(circle at 12% 0%, rgba(91, 141, 239, 0.16), transparent 35%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 35%),
        rgba(5, 15, 27, 0.82);
    box-shadow:
        0 26px 68px rgba(0, 0, 0, 0.42),
        0 0 42px rgba(91, 141, 239, 0.14),
        0 0 0 1px rgba(255, 255, 255, 0.035) inset;
}

.cross-workspace {
    margin-top: 0;
}

.cross-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(330px, 390px);
    align-items: start;
    gap: 28px;
    min-height: 210px;
    padding: 32px 36px 28px;
    background:
        radial-gradient(circle at 0% 0%, rgba(91, 141, 239, 0.23), transparent 35%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 42%),
        rgba(4, 13, 24, 0.72);
}

.cross-header::before {
    width: 82px;
    height: 82px;
    margin-top: 12px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 35% 35%, rgba(240, 199, 102, 0.96), transparent 8%),
        radial-gradient(circle at 68% 28%, rgba(240, 199, 102, 0.86), transparent 8%),
        radial-gradient(circle at 45% 68%, rgba(240, 199, 102, 0.82), transparent 8%),
        linear-gradient(135deg, rgba(240, 199, 102, 0.14), rgba(91, 141, 239, 0.1));
    box-shadow:
        0 0 0 1px rgba(139, 187, 246, 0.38) inset,
        0 0 28px rgba(91, 141, 239, 0.26);
}

.cross-header h2,
.analytics-header h2,
.weekly-outlook-header h2 {
    font-family: "Cormorant Garamond", Georgia, serif;
    color: var(--gold-soft);
    font-size: clamp(1.95rem, 2vw, 2.55rem);
    line-height: 1;
    text-transform: uppercase;
}

.cross-header p {
    max-width: 760px;
    margin-top: 14px;
    color: rgba(223, 233, 245, 0.76);
    font-size: 1.04rem;
}

.cross-controls {
    gap: 14px;
}

.cross-controls label {
    color: var(--gold-soft);
}

.cross-controls select,
.cross-controls .refresh-button,
.cross-controls .sample-button {
    min-height: 54px;
    border-radius: 9px;
}

.cross-controls select {
    padding: 0 16px;
    border-color: rgba(139, 187, 246, 0.48);
    background: rgba(5, 14, 25, 0.86);
    font-size: 1.08rem;
}

.cross-controls .refresh-button {
    color: #101720;
}

.cross-workspace .history-status {
    min-height: 52px;
    display: flex;
    align-items: center;
    width: min(640px, calc(100% - 72px));
    max-width: none;
    margin: 0 36px 28px;
    padding: 0 24px;
    border-color: rgba(126, 231, 135, 0.28);
    border-radius: 9px;
    background: rgba(13, 38, 29, 0.44);
    color: #c8f7d2;
}

.cross-workspace .history-status.is-ready::before {
    content: "";
    width: 14px;
    height: 14px;
    margin-right: 18px;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 18px rgba(126, 231, 135, 0.55);
}

.cross-context-output {
    padding: 0 36px 36px;
}

.cross-card-grid {
    gap: 26px;
}

.cross-card {
    overflow: hidden;
    min-height: 430px;
    padding: 30px;
    border-color: rgba(139, 187, 246, 0.52);
    border-radius: 14px;
    background:
        radial-gradient(circle at 8% 4%, rgba(91, 141, 239, 0.22), transparent 30%),
        linear-gradient(128deg, rgba(255, 255, 255, 0.085), transparent 29%, rgba(91, 141, 239, 0.09) 66%, transparent 68%),
        rgba(8, 22, 38, 0.86);
    box-shadow:
        0 24px 52px rgba(0, 0, 0, 0.38),
        0 0 34px rgba(91, 141, 239, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.cross-card.wide {
    min-height: 0;
}

.cross-market-heading,
.cross-card-heading {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.cross-market-heading::before {
    content: "";
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 999px;
    background:
        repeating-linear-gradient(180deg, transparent 0 8px, rgba(5, 13, 23, 0.2) 8px 10px),
        linear-gradient(135deg, #ffe39a, #c98f32);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.22) inset,
        0 0 22px rgba(240, 199, 102, 0.28);
}

.cross-market-heading h3,
.cross-card-heading h3 {
    flex: 1;
    font-family: "Cormorant Garamond", Georgia, serif;
    color: var(--gold-soft);
    font-size: 1.95rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.cross-currency {
    color: var(--gold-soft);
    font-size: 1.18rem;
    font-weight: 900;
}

.cross-card .detail-row {
    padding: 13px 0;
    font-size: 1.02rem;
}

.cross-card .detail-value {
    color: var(--text);
    font-weight: 900;
}

.cross-card .positive,
.cross-card .confidence-high,
.cross-card .bias-bullish {
    color: var(--green);
}

.cross-card .negative,
.cross-card .confidence-low,
.cross-card .bias-bearish {
    color: #ff685d;
}

.playbook-summary div,
.diagnostic-summary div,
.outlook-grid div,
.outlook-detail-grid div,
.chart-panel {
    border-color: rgba(139, 187, 246, 0.3);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 38%),
        rgba(9, 23, 39, 0.82);
}

.panel-header,
.analytics-header,
.weekly-outlook-header,
.legend-panel summary,
.diagnostics-panel summary {
    padding-left: 24px;
    padding-right: 24px;
}

.panel-grid {
    gap: 22px;
}

.decision-strip {
    gap: 16px;
}

@media (max-width: 1180px) {
    .workspace-nav {
        flex-wrap: wrap;
        gap: 14px;
        padding: 16px 24px;
    }

    .workspace-tabs {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .workspace-nav button {
        min-height: 62px;
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-actions {
        justify-content: flex-start;
    }

    .cross-header {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .cross-controls {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .dashboard-header,
    .status-banner,
    #market-workspace,
    .cross-workspace {
        width: min(100% - 28px, 1540px);
    }

    .workspace-nav {
        position: static;
        min-height: 0;
    }

    .app-brand {
        min-width: 0;
    }

    .nav-tools {
        display: none;
    }

    .workspace-tabs {
        height: auto;
        display: grid;
        grid-template-columns: 1fr;
    }

    .workspace-nav button {
        min-width: 0;
        min-height: 58px;
        border-radius: 12px;
    }

    h1 {
        font-size: clamp(3rem, 15vw, 4.1rem);
    }

    .dashboard-header {
        padding: 24px 14px;
    }

    .header-actions,
    .market-control,
    .timestamp,
    .refresh-button,
    .sample-button {
        width: 100%;
    }

    .cross-header {
        grid-template-columns: 1fr;
        padding: 24px 18px;
    }

    .cross-header::before {
        width: 64px;
        height: 64px;
    }

    .cross-context-output {
        padding: 0 18px 24px;
    }

    .cross-workspace .history-status {
        width: calc(100% - 36px);
        margin: 0 18px 22px;
    }
}

/* UI correction pass: preserve workspace hiding and reduce the oversized B-refinement typography. */
[hidden] {
    display: none !important;
}

.workspace-nav button {
    min-width: 220px;
    min-height: 70px;
    font-size: 0.96rem;
}

.dashboard-header {
    min-height: 210px;
}

.dashboard-header > div:first-child {
    max-width: 660px;
}

h1 {
    font-size: clamp(2.55rem, 4.15vw, 4.3rem);
    line-height: 0.95;
}

.weekly-outlook-header h2 {
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    line-height: 1.05;
}

@media (max-width: 760px) {
    .workspace-nav button {
        min-height: 54px;
        font-size: 0.9rem;
    }

    h1 {
        font-size: clamp(2.45rem, 12vw, 3.25rem);
    }

    .weekly-outlook-header h2 {
        font-size: clamp(1.3rem, 7vw, 1.65rem);
    }
}

/* Focused tool refinement: remove decorative utilities, compact cross explorer, calm weekly note. */
.workspace-nav {
    grid-template-columns: auto 1fr;
}

.workspace-tabs {
    margin-right: 0;
}

.weekly-outlook {
    background:
        radial-gradient(circle at 12% 0%, rgba(91, 141, 239, 0.13), transparent 36%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 36%),
        rgba(5, 15, 27, 0.84);
}

.weekly-outlook-header {
    align-items: center;
    min-height: 142px;
    padding: 26px 28px;
    background:
        linear-gradient(135deg, rgba(91, 141, 239, 0.11), transparent 42%),
        rgba(6, 16, 28, 0.78);
}

.weekly-outlook-header .eyebrow {
    margin-bottom: 10px;
    color: rgba(240, 199, 102, 0.9);
    font-size: 0.78rem;
}

.weekly-outlook-header h2,
#outlook-context {
    max-width: 980px;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: rgba(255, 247, 224, 0.94);
    font-size: clamp(1.28rem, 1.85vw, 1.72rem);
    font-weight: 750;
    line-height: 1.24;
    text-transform: none;
    text-shadow: none;
}

.outlook-structure {
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 42%),
        rgba(11, 27, 46, 0.72);
}

.outlook-grid,
.outlook-detail-grid {
    padding: 14px;
}

.cross-workspace {
    background:
        radial-gradient(circle at 8% 0%, rgba(91, 141, 239, 0.12), transparent 32%),
        rgba(5, 15, 27, 0.84);
}

.cross-header {
    grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
    min-height: 0;
    gap: 22px;
    padding: 22px 26px;
    align-items: center;
    background:
        linear-gradient(135deg, rgba(91, 141, 239, 0.09), transparent 42%),
        rgba(5, 14, 25, 0.72);
}

.cross-header::before {
    display: none;
}

.cross-header .eyebrow {
    margin-bottom: 7px;
    color: rgba(240, 199, 102, 0.88);
}

.cross-header h2 {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    font-size: 1.26rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: none;
}

.cross-header p {
    max-width: 720px;
    margin-top: 8px;
    font-size: 0.94rem;
    line-height: 1.55;
}

.cross-controls {
    gap: 10px;
}

.cross-controls select,
.cross-controls .refresh-button,
.cross-controls .sample-button {
    min-height: 48px;
}

.cross-workspace .history-status {
    width: min(520px, calc(100% - 52px));
    min-height: 44px;
    margin: 16px 26px 22px;
    padding: 0 18px;
}

.cross-context-output {
    padding: 0 26px 30px;
}

@media (max-width: 1180px) {
    .cross-header {
        grid-template-columns: 1fr;
    }

    .cross-controls {
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .weekly-outlook-header {
        min-height: 0;
        padding: 20px 18px;
    }

    .weekly-outlook-header h2,
    #outlook-context {
        font-size: clamp(1.12rem, 5vw, 1.42rem);
    }

    .cross-header {
        padding: 20px 18px;
    }

    .cross-workspace .history-status {
        width: calc(100% - 36px);
        margin: 14px 18px 20px;
    }
}

/* Workspace-specific presentation: Cross Explorer should not inherit the market hero. */
body.is-cross-workspace .dashboard-header,
body.is-cross-workspace .status-banner {
    display: none;
}

body.is-cross-workspace .cross-workspace {
    margin-top: 34px;
}

/* Final Weekly Outlook calm-down pass: premium note, not a headline banner. */
.weekly-outlook-header {
    min-height: 112px;
    padding: 20px 24px;
}

.weekly-outlook-header .eyebrow {
    margin-bottom: 7px;
    font-size: 0.74rem;
}

.weekly-outlook-header h2,
#outlook-context {
    max-width: 900px;
    color: rgba(243, 247, 251, 0.92);
    font-size: clamp(1.08rem, 1.45vw, 1.36rem);
    font-weight: 650;
    line-height: 1.36;
}

.outlook-structure {
    min-height: 64px;
    min-width: 170px;
    padding: 12px 14px;
}

@media (max-width: 760px) {
    body.is-cross-workspace .cross-workspace {
        margin-top: 18px;
    }

    .weekly-outlook-header {
        padding: 18px;
    }

    .weekly-outlook-header h2,
    #outlook-context {
        font-size: clamp(1.02rem, 4.6vw, 1.22rem);
    }
}
