:root {
    color-scheme: dark;
    --bg: #020604;
    --panel: rgba(7, 18, 13, .88);
    --panel-solid: #07120d;
    --ink: #effff6;
    --muted: #8aa896;
    --line: rgba(124, 255, 178, .18);
    --accent: #00e676;
    --accent-2: #00b8ff;
    --positive: #69ff9d;
    --negative: #ff5872;
    --warning: #ffd166;
    --shadow: 0 24px 80px rgba(0, 0, 0, .44);
    --glow: 0 0 30px rgba(0, 230, 118, .24);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    width: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 72% 12%, rgba(0, 184, 255, .18), transparent 28rem),
        radial-gradient(circle at 12% 10%, rgba(0, 230, 118, .18), transparent 24rem),
        linear-gradient(180deg, #041009 0%, var(--bg) 42%, #010302 100%);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: grid;
    grid-template-columns: 286px minmax(0, 1fr);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(124, 255, 178, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 255, 178, .07) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .8), transparent 75%);
}

body::after {
    content: "010101  TREND  SIGNAL  ASSET  ALPHA  101011  MARKET  GOLD  BTC  EQUITY";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 10px;
    pointer-events: none;
    color: rgba(105, 255, 157, .08);
    font-size: 11px;
    letter-spacing: 18px;
    white-space: nowrap;
    overflow: hidden;
}

a {
    color: inherit;
}

.login-screen {
    display: block;
    min-height: 100vh;
    overflow: hidden;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    position: relative;
}

.login-shell::before {
    content: "";
    position: absolute;
    width: min(78vw, 980px);
    height: min(78vw, 980px);
    border: 1px solid rgba(105, 255, 157, .14);
    border-radius: 50%;
    box-shadow: inset 0 0 80px rgba(0, 230, 118, .08), 0 0 120px rgba(0, 184, 255, .08);
}

.login-panel {
    width: min(100%, 500px);
    position: relative;
    z-index: 1;
    padding: 34px;
    border: 1px solid rgba(124, 255, 178, .28);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)),
        rgba(3, 12, 8, .86);
    box-shadow: var(--shadow), var(--glow);
    backdrop-filter: blur(18px);
}

.login-brand {
    display: grid;
    gap: 16px;
    margin-bottom: 34px;
}

.login-brand img {
    width: min(100%, 340px);
    height: auto;
}

.login-brand span,
.eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.login-brand span {
    margin-top: 2px;
}

.login-panel h1 {
    margin: 0;
    font-size: clamp(38px, 8vw, 62px);
    line-height: .94;
    letter-spacing: 0;
}

.login-panel p {
    color: var(--muted);
    margin: 18px 0 26px;
    font-size: 16px;
    line-height: 1.6;
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.login-form input {
    width: 100%;
    height: 52px;
    border: 1px solid rgba(124, 255, 178, .22);
    border-radius: 10px;
    background: rgba(0, 0, 0, .34);
    color: var(--ink);
    padding: 0 15px;
    font: inherit;
    outline: none;
}

.login-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 230, 118, .13);
}

.login-form button {
    height: 54px;
    border: 0;
    border-radius: 10px;
    margin-top: 6px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #00180b;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(0, 230, 118, .2);
}

.login-error {
    border: 1px solid rgba(255, 88, 114, .32);
    background: rgba(255, 88, 114, .12);
    color: #ffb6c2;
    border-radius: 10px;
    padding: 12px 14px;
    font-weight: 750;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px;
    background: rgba(3, 12, 8, .78);
    border-right: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.brand {
    display: grid;
    gap: 14px;
    margin-bottom: 32px;
}

.brand-logo {
    width: min(100%, 218px);
    height: auto;
    filter: drop-shadow(0 0 16px rgba(0, 230, 118, .24));
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 18px;
}

.brand small,
.source-note,
.panel-heading p,
.stock-row small,
.kpi-card small {
    color: var(--muted);
}

nav {
    display: grid;
    gap: 8px;
}

nav a,
.logout-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
}

nav a svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    fill: currentColor;
    color: var(--accent);
    filter: drop-shadow(0 0 8px rgba(0, 230, 118, .22));
}

nav a:hover,
.active,
.logout-link:hover {
    background: rgba(0, 230, 118, .1);
    border-color: rgba(0, 230, 118, .2);
    color: var(--accent);
}

.sidebar-footer {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    display: grid;
    gap: 10px;
}

.source-note {
    margin: 0;
    font-size: 13px;
}

.logout-link {
    display: inline-flex;
    width: fit-content;
    color: var(--muted);
    font-size: 13px;
}

main:not(.login-shell) {
    padding: 32px;
    position: relative;
    z-index: 1;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

h1,
h2 {
    margin: 0;
    overflow-wrap: anywhere;
}

h1 {
    font-size: clamp(38px, 5vw, 64px);
    line-height: .95;
}

h2 {
    font-size: 22px;
}

.status-pill {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(7, 18, 13, .75);
    color: var(--muted);
    white-space: nowrap;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.kpi-card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    min-width: 0;
}

.kpi-card {
    padding: 18px;
}

.kpi-card span,
.kpi-card small {
    display: block;
}

.kpi-card strong {
    display: block;
    margin: 8px 0;
    font-size: 24px;
}

.panel {
    margin-top: 20px;
    overflow: hidden;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--line);
}

.panel-heading > *,
.topbar > *,
.astro-hero > *,
.forecast-card > *,
.calendar-card > *,
.aspect-card > *,
.backtest-row > *,
.motion-heading > *,
.universe-card-head > * {
    min-width: 0;
}

.panel-heading p {
    margin: 4px 0 0;
}

.stock-table {
    display: grid;
}

.stock-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.5fr) minmax(110px, .8fr) minmax(120px, .9fr) minmax(150px, 1fr) minmax(110px, .8fr);
    gap: 16px;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
}

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

.stock-row.head {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    background: rgba(105, 255, 157, .04);
}

.stock-row strong,
.stock-row small {
    display: block;
    overflow-wrap: anywhere;
}

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

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

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

.sparkline {
    display: grid;
    gap: 4px;
    width: min(100%, 176px);
}

.sparkline svg {
    width: 100%;
    height: 54px;
    overflow: visible;
}

.sparkline-line {
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 8px currentColor);
}

.sparkline-fill {
    fill: currentColor;
    opacity: .12;
}

.sparkline small {
    justify-self: end;
    font-size: 11px;
    font-weight: 800;
}

.chart-empty {
    color: var(--muted);
    font-size: 12px;
}

.astro-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    margin-bottom: 20px;
}

.astro-hero h2 {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1;
    margin-top: 8px;
}

.astro-hero p {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.7;
    margin: 16px 0 0;
}

.astro-meta {
    min-width: 180px;
    align-self: flex-start;
    border: 1px solid rgba(0, 230, 118, .2);
    border-radius: 12px;
    padding: 16px;
    background: rgba(0, 230, 118, .06);
}

.astro-meta span,
.astro-meta small {
    display: block;
    color: var(--muted);
}

.astro-meta strong {
    display: block;
    margin: 6px 0;
}

.astro-signal-grid .kpi-card small {
    line-height: 1.5;
}

.astro-form-panel {
    margin-bottom: 20px;
}

.astro-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 14px;
    align-items: end;
    padding: 20px;
}

.astro-form label {
    display: grid;
    gap: 8px;
}

.astro-form label span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.astro-form input {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(124, 255, 178, .22);
    border-radius: 10px;
    background: rgba(0, 0, 0, .26);
    color: var(--ink);
    padding: 0 13px;
    font: inherit;
    outline: none;
}

.astro-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 230, 118, .1);
}

.astro-form button {
    height: 48px;
    border: 0;
    border-radius: 10px;
    padding: 0 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #00180b;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.astro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    padding: 20px;
}

.aspect-list {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.aspect-card {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(130px, .35fr);
    gap: 14px 18px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, .035);
}

.aspect-card.high {
    border-color: rgba(255, 138, 76, .34);
    box-shadow: inset 0 0 32px rgba(255, 138, 76, .06);
}

.aspect-card.medium {
    border-color: rgba(0, 230, 118, .28);
}

.aspect-card span,
.aspect-card small,
.aspect-card p,
.astro-empty span {
    color: var(--muted);
}

.aspect-card span {
    display: block;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.aspect-card strong {
    display: block;
    margin: 7px 0;
    font-size: 18px;
    overflow-wrap: anywhere;
}

.aspect-card p {
    grid-column: 1 / -1;
    margin: 0;
    line-height: 1.55;
}

.aspect-metrics {
    justify-self: end;
    text-align: right;
}

.astro-empty {
    display: grid;
    gap: 6px;
    padding: 22px;
}

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

.universe-card {
    border: 1px solid rgba(63, 255, 176, .16);
    border-radius: 12px;
    padding: 18px;
    background: rgba(2, 18, 15, .78);
}

.universe-card-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.universe-card-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.universe-card-head strong {
    color: var(--text);
    white-space: nowrap;
}

.universe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.universe-tags span {
    border: 1px solid rgba(63, 255, 176, .18);
    border-radius: 999px;
    color: var(--accent);
    padding: 6px 9px;
    background: rgba(63, 255, 176, .06);
    font-size: 12px;
    font-weight: 800;
}

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

.briefing-card,
.calendar-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .035);
}

.briefing-card {
    padding: 18px;
}

.briefing-card span,
.calendar-card span,
.calendar-card small {
    color: var(--muted);
}

.briefing-card span,
.calendar-card span {
    display: block;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.briefing-card strong,
.calendar-card strong {
    display: block;
    margin: 7px 0;
    color: var(--text);
    font-size: 18px;
}

.briefing-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.calendar-list {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.calendar-card {
    display: grid;
    grid-template-columns: minmax(130px, .35fr) minmax(220px, 1fr);
    gap: 18px;
    padding: 16px;
    box-shadow: inset 0 0 28px rgba(63, 255, 176, .045);
}

.backtest-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    padding: 20px 20px 0;
}

.backtest-summary article {
    border: 1px solid rgba(0, 184, 255, .18);
    border-radius: 12px;
    padding: 15px;
    background: rgba(0, 184, 255, .035);
}

.backtest-summary span,
.backtest-summary small,
.backtest-row small {
    color: var(--muted);
}

.backtest-summary span,
.backtest-row.head {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.backtest-summary strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
    font-size: 18px;
}

.backtest-table {
    display: grid;
    padding-top: 16px;
}

.backtest-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) minmax(80px, .4fr) minmax(80px, .4fr) minmax(90px, .45fr) minmax(80px, .4fr) minmax(120px, .6fr) minmax(70px, .35fr);
    gap: 14px;
    align-items: center;
    padding: 13px 20px;
    border-top: 1px solid var(--line);
}

.backtest-row.head {
    color: var(--muted);
    background: rgba(0, 184, 255, .04);
}

.backtest-row strong,
.backtest-row small {
    display: block;
}

.backtest-subsection {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.backtest-subsection h3 {
    margin: 0;
    padding: 0 20px 4px;
    font-size: 16px;
}

.backtest-table.compact .backtest-row {
    grid-template-columns: minmax(220px, 1.25fr) minmax(100px, .55fr) minmax(90px, .45fr) minmax(100px, .55fr);
}

.forecast-list {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.forecast-card {
    display: grid;
    grid-template-columns: minmax(110px, .35fr) minmax(220px, 1fr) minmax(180px, .65fr);
    gap: 16px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, .035);
}

.forecast-card.positive {
    border-color: rgba(105, 255, 157, .28);
    box-shadow: inset 0 0 28px rgba(105, 255, 157, .06);
}

.forecast-card.negative {
    border-color: rgba(255, 88, 114, .28);
    box-shadow: inset 0 0 28px rgba(255, 88, 114, .055);
}

.forecast-card.watch {
    border-color: rgba(255, 209, 102, .28);
    box-shadow: inset 0 0 28px rgba(255, 209, 102, .055);
}

.forecast-date span,
.forecast-date small,
.forecast-main small,
.forecast-metrics small {
    color: var(--muted);
}

.forecast-date span,
.forecast-metrics span {
    display: block;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.forecast-date strong,
.forecast-main strong {
    display: block;
    margin: 6px 0;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.forecast-metrics {
    text-align: right;
}

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

.motion-panel {
    border: 1px solid rgba(255, 138, 76, .2);
    border-radius: 12px;
    background: rgba(255, 138, 76, .035);
    overflow: hidden;
}

.motion-heading {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
}

.motion-heading span,
.motion-row span,
.motion-row small,
.motion-empty {
    color: var(--muted);
}

.motion-heading span,
.motion-row span {
    display: block;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.motion-heading strong,
.motion-row strong {
    color: var(--text);
    overflow-wrap: anywhere;
}

.motion-list {
    display: grid;
}

.motion-row {
    display: grid;
    gap: 5px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

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

.motion-empty {
    margin: 0;
    padding: 16px;
}

.astro-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, .035);
}

.astro-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .12;
    background: currentColor;
}

.astro-card span,
.astro-card strong,
.astro-card small {
    position: relative;
    display: block;
}

.astro-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.astro-card strong {
    margin: 8px 0;
    font-size: 20px;
    overflow-wrap: anywhere;
}

.astro-card small {
    color: var(--muted);
}

.astro-fire {
    color: #ff8a4c;
}

.astro-earth {
    color: #9ef29c;
}

.astro-air {
    color: #7bdcff;
}

.astro-water {
    color: #9a8cff;
}

.astro-error {
    padding: 22px;
    color: var(--negative);
}

.mobile-menu-toggle,
.sidebar-backdrop {
    display: none;
}

@media (max-width: 900px) {
    body {
        display: block;
    }

    body::after {
        display: none;
    }

    body.menu-open {
        overflow: hidden;
    }

    .mobile-menu-toggle {
        position: fixed;
        top: 16px;
        right: 16px;
        z-index: 40;
        width: 48px;
        height: 48px;
        display: grid;
        place-items: center;
        gap: 0;
        border: 1px solid rgba(124, 255, 178, .32);
        border-radius: 12px;
        background: rgba(3, 12, 8, .88);
        box-shadow: 0 12px 34px rgba(0, 0, 0, .38), 0 0 22px rgba(0, 230, 118, .13);
        backdrop-filter: blur(16px);
    }

    .mobile-menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        margin: 3px 0;
        border-radius: 999px;
        background: var(--accent);
        transition: transform .2s ease, opacity .2s ease;
        box-shadow: 0 0 10px rgba(0, 230, 118, .5);
    }

    body.menu-open .mobile-menu-toggle span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    body.menu-open .mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    body.menu-open .mobile-menu-toggle span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 20;
        display: block;
        opacity: 0;
        pointer-events: none;
        background: rgba(0, 0, 0, .64);
        backdrop-filter: blur(3px);
        transition: opacity .2s ease;
    }

    body.menu-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 30;
        width: min(82vw, 340px);
        height: 100vh;
        overflow-y: auto;
        transform: translateX(-104%);
        transition: transform .24s ease;
        border-right: 1px solid var(--line);
        border-bottom: 0;
        box-shadow: 26px 0 80px rgba(0, 0, 0, .42);
    }

    body.menu-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-footer {
        position: static;
        margin-top: 20px;
    }

    main:not(.login-shell) {
        padding: 82px 20px 20px;
    }

    .topbar,
    .panel-heading,
    .astro-hero {
        display: block;
    }

    .topbar {
        margin-bottom: 18px;
    }

    h1 {
        font-size: clamp(34px, 10vw, 52px);
    }

    .panel-heading,
    .astro-hero,
    .astro-form,
    .astro-grid,
    .aspect-list,
    .universe-grid,
    .briefing-grid,
    .calendar-list,
    .forecast-list,
    .motion-grid {
        padding: 18px;
    }

    .astro-hero h2 {
        font-size: clamp(28px, 8vw, 40px);
    }

    .astro-hero p {
        max-width: none;
        margin-top: 12px;
        line-height: 1.6;
    }

    .astro-form {
        grid-template-columns: 1fr 1fr;
    }

    .astro-form button {
        grid-column: 1 / -1;
    }

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

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

    .briefing-grid,
    .calendar-card,
    .backtest-summary,
    .forecast-card,
    .motion-grid {
        grid-template-columns: 1fr;
    }

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

    .backtest-row.head {
        display: none;
    }

    .aspect-metrics {
        justify-self: start;
        text-align: left;
    }

    .forecast-metrics {
        text-align: left;
    }

    .astro-meta {
        margin-top: 18px;
        min-width: 0;
        width: 100%;
    }

    .status-pill {
        display: inline-flex;
        margin-top: 14px;
    }

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

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

    .stock-row.head {
        display: none;
    }
}

@media (max-width: 560px) {
    .login-shell {
        min-height: 100svh;
        place-items: start center;
        padding: 18px 16px 28px;
    }

    .login-shell::before {
        top: -22vh;
    }

    .login-panel {
        width: 100%;
        max-width: calc(100vw - 32px);
        margin-top: 18px;
        padding: 24px;
        overflow: hidden;
    }

    .login-brand {
        gap: 14px;
        margin-bottom: 24px;
    }

    .login-panel h1 {
        font-size: clamp(34px, 11vw, 44px);
    }

    .login-panel p {
        margin: 14px 0 20px;
        font-size: 15px;
        overflow-wrap: break-word;
    }

    .mobile-menu-toggle {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
        border-radius: 11px;
    }

    .sidebar {
        width: min(88vw, 320px);
        padding: 20px;
    }

    main:not(.login-shell) {
        padding: 76px 14px 16px;
    }

    h1 {
        font-size: clamp(31px, 11vw, 42px);
        line-height: 1;
    }

    h2 {
        font-size: 20px;
    }

    .status-pill {
        max-width: 100%;
        white-space: normal;
    }

    .panel {
        margin-top: 16px;
        border-radius: 10px;
    }

    .panel-heading,
    .astro-hero,
    .astro-form,
    .astro-grid,
    .aspect-list,
    .universe-grid,
    .briefing-grid,
    .calendar-list,
    .forecast-list,
    .motion-grid {
        padding: 15px;
    }

    .kpi-card,
    .aspect-card,
    .universe-card,
    .briefing-card,
    .calendar-card,
    .forecast-card,
    .motion-panel,
    .astro-card {
        border-radius: 10px;
    }

    .astro-hero h2 {
        font-size: clamp(25px, 9vw, 34px);
    }

    .astro-meta {
        padding: 14px;
    }

    .stock-row {
        grid-template-columns: 1fr;
        padding: 14px 15px;
    }

    .backtest-row {
        grid-template-columns: 1fr;
        padding: 14px 15px;
    }

    .astro-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .forecast-card,
    .calendar-card,
    .aspect-card {
        padding: 14px;
        gap: 12px;
    }

    .motion-heading {
        display: grid;
        padding: 14px;
    }

    .universe-card-head {
        display: grid;
        gap: 6px;
    }

    .universe-card-head strong {
        white-space: normal;
    }
}
