/* Investment Path – responsive
   Breakpoints, print, and reduced motion for everything above.
   ========================================================================== */

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .charts-row { grid-template-columns: 1fr; }
    .site-brand small { display: none; }
}

@media (max-width: 900px) {
    .site-header {
        top: 6px;
        width: min(calc(100% - 24px), 1540px);
        margin-block: 6px 10px;
        gap: 12px;
    }
    .site-nav { gap: 12px; }
    .app {
        width: 100%;
        height: auto;
        min-height: 0;
        margin: 0;
        display: block;
    }
    .sidebar {
        width: 100%;
        min-width: 0;
        max-height: none;
        border: 0;
        border-radius: 0;
        border-bottom: 1px solid var(--border);
        box-shadow: none;
    }
    .main { max-height: none; padding: 20px 16px 32px; }
    .hero-value { font-size: 32px; }
    .hero-side { text-align: left; }

    /* The result bar. Fixed to the bottom rather than the top: it is within
       thumb reach there, and it does not fight the topbar for the one strip
       of a phone screen that is always visible. The page gains matching
       bottom padding so the bar never covers the last control. */
    .result-peek {
        display: flex;
        position: fixed;
        inset-inline: 10px;
        bottom: 10px;
        z-index: 40;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 11px 16px;
        border: 1px solid var(--border-strong);
        border-radius: 15px;
        background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        color: var(--text);
        font-family: inherit;
        cursor: pointer;
        text-align: left;
    }

    .result-peek[hidden] { display: none; }

    .result-peek-text { display: grid; gap: 1px; min-width: 0; }

    .result-peek-label {
        color: var(--text-faint);
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .result-peek-value {
        font-size: 17px;
        font-weight: 760;
        letter-spacing: -0.02em;
        font-variant-numeric: tabular-nums;
    }

    .result-peek-cue {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        flex: none;
        color: var(--accent-2-text);
        font-size: 11px;
        font-weight: 700;
    }

    .result-peek-cue svg { width: 14px; height: 14px; }

    body { padding-bottom: 74px; }
}

@media (max-width: 960px) {
    .site-header {
        top: 5px;
        width: calc(100% - 20px);
        min-height: 0;
        flex-wrap: wrap;
        gap: 8px;
        margin-block: 5px 10px;
        padding: 8px 10px 9px;
        border-radius: 16px;
    }

    .site-brand { order: 1; }

    .site-brand-mark {
        width: 36px;
        height: 36px;
    }

    .site-brand-copy strong { font-size: 13.5px; }

    .site-nav {
        order: 4;
        width: 100%;
        min-width: 0;
        gap: 12px;
        margin-left: 0;
        padding-top: 5px;
        border-top: 1px solid var(--border);
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .site-nav::-webkit-scrollbar { display: none; }

    .site-nav-link,
    .site-nav-badge {
        min-height: 30px;
        font-size: 9.5px;
    }

    .site-home-link { display: none; }

    .site-header > .lang-switch {
        order: 2;
        margin-left: auto;
    }

    .site-header .lang-switch a {
        padding: 3px 5px;
        font-size: 10px;
    }

    .site-nav-badge {
        padding-inline: 7px;
    }

    .site-theme {
        order: 3;
        width: 36px;
        height: 36px;
        min-width: 36px;
        margin-left: auto;
    }

    .site-header > .lang-switch + .site-theme { margin-left: 0; }
}

@media (max-width: 560px) {
    .field-grid { grid-template-columns: 1fr; }
    .main-head { flex-direction: column; }
    .cards { grid-template-columns: 1fr 1fr; }
    .login-card { padding: 24px 20px; }
    .legal-card { border-radius: 18px; }
    .legal-footer { align-items: flex-start; flex-direction: column; }
    .legal-footer nav { justify-content: flex-start; }
}

@media (max-width: 480px) {
    .site-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2px 10px;
        overflow: visible;
    }

    .site-nav-link,
    .site-nav-badge {
        width: 100%;
        min-height: 32px;
        padding-inline: 4px;
        line-height: 1.2;
        text-align: center;
        white-space: normal;
    }

    .site-nav-link::after {
        right: 4px;
        left: 4px;
    }
}

@media (max-width: 340px) {
    .site-brand-copy { display: none; }
    .site-nav { gap: 9px; }
    .site-nav-link,
    .site-nav-badge { font-size: 9px; }
}

@media print {
    .legal-page { padding: 0; background: #fff; color: #111; }
    .legal-page .bg-glow,
    .site-header,
    .skip-link { display: none !important; }
    .legal-card { padding: 0; border: 0; box-shadow: none; background: #fff; }
    .legal-section p,
    .legal-section li,
    .legal-address,
    .legal-footer { color: #333; }
    .legal-section a,
    .legal-footer a { color: #111; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .action-primary,
    .btn-primary,
    .ghost-btn,
    .site-theme,
    .segmented button {
        transform: none !important;
    }

    .action-primary::after,
    .btn-primary::after {
        display: none !important;
    }
}
