@media (max-width: 700px) {
    .portal-shell {
        width: min(calc(100% - 1rem), 1240px);
    }

    .portal-header__inner {
        min-height: 56px;
        gap: 0.6rem;
    }

    .portal-brand {
        gap: 0.45rem;
        min-width: 0;
    }

    .portal-brand__mark {
        font-size: 0.95rem;
    }

    .portal-brand__copy strong {
        font-size: 0.9rem;
    }

    .portal-brand__copy small {
        font-size: 0.65rem;
    }

    .portal-header__actions {
        gap: 0.4rem;
    }

    .portal-header__actions .ui-badge {
        padding-inline: 0.55rem;
        font-size: 0.68rem;
        white-space: nowrap;
    }

    .portal-body {
        padding-block: 0.75rem 2rem;
    }

    .portal-main > * + * {
        margin-top: 0.75rem;
    }

    .portal-page-header {
        margin-bottom: 0.75rem;
    }

    .portal-page-header__eyebrow {
        margin-bottom: 0.3rem;
        font-size: 0.68rem;
    }

    .portal-page-header h1 {
        font-size: clamp(1.75rem, 8vw, 2.35rem);
        line-height: 1.02;
        letter-spacing: -0.035em;
    }

    .portal-page-header h2 {
        font-size: clamp(1.35rem, 6vw, 1.8rem);
    }

    .portal-page-header p {
        margin-top: 0.55rem;
        font-size: 0.94rem;
        line-height: 1.45;
    }

    .portal-footer {
        padding-block: 0.9rem max(1rem, env(safe-area-inset-bottom));
    }

    .portal-footer__inner {
        gap: 0.7rem;
    }

    .portal-theme {
        width: 100%;
        justify-content: space-between;
    }

    .portal-theme button {
        flex: 1 1 0;
        min-height: 42px;
        padding-inline: 0.45rem;
    }
}

@media (max-width: 380px) {
    .portal-shell {
        width: min(calc(100% - 0.75rem), 1240px);
    }

    .portal-brand__copy small {
        display: none;
    }

    .portal-header__actions .ui-badge {
        font-size: 0.62rem;
    }
}
