@media (max-width: 440px) {
  .header-container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    height: auto;
    min-height: 0;
    padding: 8px 10px;
    z-index: 10001;
    margin-bottom: 0;
    gap: 4px;
  }

  main {
    padding: 0 12px 16px;
  }

  body {
    justify-content: center;
  }

  header h1 {
    font-size: clamp(1.45rem, 6.1vw, 1.8rem);
    line-height: 1.05;
    margin-bottom: 0;
    text-align: center;
  }

  footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)) 4px;
    font-size: 0.9rem;
    line-height: 1.05;
    margin: 0;
    height: auto;
    min-height: var(--footer-height);
    max-height: none;
  }

  .footer-copyright {
    margin-top: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
    width: 100%;
    max-width: 100%;
    padding: 0 6px;
    box-sizing: border-box;
    align-items: center;
    row-gap: 4px;
    margin-top: 0;
  }

  header nav a {
    font-size: clamp(11px, 3.1vw, 13px);
    white-space: nowrap;
  }

  header nav a:last-child {
    margin-right: 0;
  }

  .after-main-ad {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 18px auto calc(120px + env(safe-area-inset-bottom, 0px));
    padding: 16px 0 24px;
    min-height: 140px;
    line-height: 2;
  }

  .mailing-list-popup {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100vw - 24px);
    max-width: 440px;
    bottom: calc(var(--footer-height) + 14px + env(safe-area-inset-bottom, 0px));
    padding: 12px;
    background: rgba(13, 13, 13, 0.4);
  }

  .pillars-row {
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 14px;
    overflow: hidden;
    box-sizing: border-box;
  }

  .unified-tech-section {
    padding: 0 8px;
  }

  .unified-tech-section .pillars-container-link {
    justify-content: flex-start;
  }

  .pillars-container {
    width: 100%;
    max-width: 440px;
    max-height: 170px;
    margin: 10px auto;
    padding: 24px 16px;
    box-sizing: border-box;
  }

  .support-page {
    margin-top: -24px;
  }

  .support-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 6px 2px 6px;
    box-sizing: border-box;
  }

  .support-form {
    width: 100%;
    padding: 14px;
    box-sizing: border-box;
  }

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

  .form-field.full-width {
    grid-column: auto;
  }

  .support-form .form-field input {
    width: 100%;
    box-sizing: border-box;
  }

  .support-form .form-field select {
    width: 100%;
    box-sizing: border-box;
  }

  .support-form .form-field textarea {
    width: 100%;
    box-sizing: border-box;
  }

  .form-actions {
    justify-content: stretch;
    gap: 10px;
  }

  .form-actions .btn-primary {
    flex: 1;
    min-width: 0;
    color: white;
  }

  .form-actions .btn-secondary {
    flex: 1;
    min-width: 0;
    color: white;
  }

  :root {
    --header-height: 95px;
    --header-safe-padding: 10px;
    --footer-height: 96px;
    --footer-safe-padding: 8px;
  }

  h2 {
    margin-left: 0;
    margin-right: 0;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
  }

  .home-welcome-title {
    font-size: clamp(1.05rem, 4.8vw, 1.35rem);
    white-space: nowrap;
  }

  .page-header-tight h1 {
    margin-top: 0;
  }

  .page-header-tight h2 {
    margin-top: 0;
  }

  .page-header-tighter h1 {
    margin-top: 0;
  }

  .page-header-tighter h2 {
    margin-top: 0;
  }

  .systems-home-page {
    margin-top: -12px;
  }

  .systems-home-page>h2 {
    text-align: left;
  }

  .systems-home-page>p {
    text-align: left;
    margin-bottom: 22px;
    font-size: 0.95rem;
  }

  .systems-home-page .app-grid {
    gap: 34px;
  }

  .systems-home-page .app-module {
    padding: 6px 0 12px;
  }

  .systems-home-page .app-icon {
    margin-bottom: 18px;
  }

  .systems-home-page .app-icon a {
    min-height: 0;
    padding: 0;
    border-radius: 0;
  }

  .systems-home-page .app-icon img {
    border-radius: 30px;
  }

  .systems-home-page .app-module h3 {
    font-size: 1.45rem;
  }

  .systems-home-page .app-link {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .app-store-banner {
    width: 100vw;
    box-sizing: border-box;
  }

  .hidden-on-page {
    display: none;
  }

  .hero-text-overlay {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
  }

  .hero-text-overlay h1.home-welcome-title {
    font-size: clamp(1.35rem, 8vw, 2rem);
    font-weight: 800;
    margin: 0;
    padding: 0;
    line-height: 1.02;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
    display: inline-block;
    white-space: normal;
    max-width: 92vw;
  }

  .hero-text-overlay .home-welcome-prefix {
    font-size: clamp(1.35rem, 8vw, 2rem);
    font-weight: 800;
    margin: 0;
    padding: 0;
    line-height: 1.02;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
    display: inline-block;
    margin-right: 0.1em;
    white-space: normal;
    max-width: 92vw;
  }

  /* Reinforce hero wrap for 440px breakpoint */
  @media (max-width: 440px) {
    .hero-text-overlay {
      flex-direction: column !important;
      white-space: normal !important;
      gap: 6px;
      align-items: center !important;
    }
    .hero-text-overlay .home-welcome-prefix,
    .hero-text-overlay h1.home-welcome-title {
      white-space: normal !important;
    }
  }

  .banner-row--finance {
    --banner-track-offset: 5.9rem;
  }

  .banner-row--news {
    --banner-track-offset: 5.9rem;
  }

  .banner-row__items {
    gap: 18px;
    font-size: 0.9rem;
  }

  .banner-row__brand {
    font-size: 17px;
    padding-left: 8px;
    padding-right: 6px;
  }

  .feature-banner-container {
    width: calc(100vw - 24px);
    padding: 6px;
    margin-bottom: 28px;
    border-radius: 22px;
    overflow: hidden;
  }

  .feature-banner {
    padding: 18px 10px 30px;
    border-radius: 18px;
  }

  .feature-banner-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .feature-banner-stat:last-child {
    grid-column: 1 / -1;
  }

  .feature-banner-stat-value {
    font-size: 0.82rem;
    overflow-wrap: anywhere;
  }

  .footer-copyright {
    white-space: normal;
  }

  .divisions-page .cards-wrapper {
    gap: 12px;
  }

  .divisions-page .card-link {
    width: 100%;
    max-width: 440px;
  }

  .divisions-page .flip-card-container {
    height: 128px;
  }

  .divisions-page .flip-card-front {
    padding: 14px;
    font-size: 0.9rem;
  }

  .divisions-page .flip-card-back {
    padding: 14px;
    font-size: 0.9rem;
  }

  .open-position-card {
    padding: 16px;
    gap: 12px;
  }

  .open-position-card h3 {
    font-size: 1.2rem;
  }

  .badge-container {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }
}
/* From layout.css */
@media (max-width: 440px) {
  .call-to-action-banner-container {
    padding: 12px 0;
  }

  .call-to-action-banner {
    padding: 12px 14px;
    border-radius: 10px;
  }
}

/* From rae.css */
@media (max-width: 440px) {
    footer.corporate-label {
        height: auto !important;
        min-height: 100px;
        max-height: none !important;
        overflow: visible !important;
        padding: 8px 10px 12px 10px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .footer-top-row {
        display: flex;
        gap: 10px;
        width: 100%;
        justify-content: center;
    }

    .footer-middle-row {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        font-size: 13px;
        color: #fff;
    }

    .footer-middle-row .footer-links {
      margin: 0 4px !important;
    }

    .footer-separator {
        color: rgba(255, 255, 255, 0.4);
        font-size: 14px;
    }

    .footer-copyright {
        padding: 0 10px !important;
        display: block !important;
        font-size: 13px;
        color: rgba(255, 255, 255, 0.9);
        text-align: center;
        position: relative;
        width: 100%;
        box-sizing: border-box;
    }

    .footer-copyright-copy {
        position: relative;
        z-index: 10;
        pointer-events: none; /* Allows clicking the RAE button through the text */
    }

    .report-error-link {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        display: flex !important;
        align-items: center;
        justify-content: center;
        color: #000 !important;
        background: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
        opacity: 1;
        font-size: 12px;
        font-weight: normal;
        text-decoration: none;
        z-index: 5;
    }
}

/* From headers.css */
@media (max-width: 440px) {

    #header {

        padding: calc(env(safe-area-inset-top, 0px) + 10px) 4px 6px 4px;
        align-items: center;
        --header-nav-size: clamp(11px, 2.9vw, 13px);
        gap: 4px;

    }

    #header .header-left {

        flex-basis: 20%;
        min-width: 0;

    }

    #header .header-center {

        flex-basis: 48%;
        padding: 0 1px;
        min-width: 0;

    }

    #header .header-right {

        flex-basis: 32%;
        min-width: 0;

    }

    #header .nav-label {

        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.08;
        max-width: none;
        font-size: clamp(11px, 2.9vw, 13px);

    }

    #header .title {

        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.06;
        text-align: center;
        font-size: clamp(11px, 3.1vw, 14px);
        letter-spacing: -0.1px;

    }

    #header .header-left .nav-label {

        text-align: left;
        max-width: 100%;

    }

    #header .header-right .nav-label {

        text-align: right;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
        max-width: none;

    }

    #header .right-cluster {

        gap: 3px;
        min-width: 0;
        max-width: 100%;

    }

    #header .avatar-btn {

        width: 27px;
        height: 27px;
        font-size: 10px;
        flex: 0 0 27px;

    }

    .header-container {

        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
        height: auto;
        min-height: 0;
        padding: 8px 10px;
        z-index: 10001;
        margin-bottom: 0;
        gap: 4px;

    }

    header h1 {

        font-size: clamp(1.45rem, 6.1vw, 1.8rem);
        line-height: 1.05;
        margin-bottom: 0;
        text-align: center;

    }

    header nav {

        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px 8px;
        width: 100%;
        max-width: 100%;
        padding: 0 6px;
        box-sizing: border-box;
        align-items: center;
        row-gap: 4px;
        margin-top: 0;

    }

    header nav a {

        font-size: clamp(11px, 3.1vw, 13px);
        white-space: nowrap;

    }

    header nav a:last-child {

        margin-right: 0;

    }

}

/* From msmg.css */
@media (max-width: 440px) {
    .msmg-flex-container {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .msmg-brand {
        margin-right: 0;
        margin-left: 0;
        text-align: center;
    }

    .msmg-nav {
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
        width: 100%;
    }

    .msmg-sticky-spacer {
        height: 72px;
    }

    .msmg-live-banner {
        top: 72px;
    }
}

/* From app.css */
@media (max-width: 440px) {

.profile-graph-tabs {

    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    bottom: calc(228px + env(safe-area-inset-bottom, 0px)) !important;
    top: auto !important;
    z-index: 22 !important;
  
}

}

/* From app.css */
@media (max-width: 440px) {

.profile-graph-shell {

    top: calc(80px + env(safe-area-inset-top, 0px));
    bottom: calc(276px + env(safe-area-inset-bottom, 0px));
  
}

.profile-graph-frame {

    top: 27px;
    right: 20px;
    bottom: 23px;
    left: 19px;
    padding: 8px;
    border-radius: 12px;
    overflow: hidden;
    clip-path: inset(0 0 0 0);
  
}

.profile-graph-canvas {

    width: 100%;
    height: 100%;
    display: block;
  

}

.profile-graph-canvas svg {

    width: 100%;
    height: 100%;
    display: block;
  

}

.profile-toc-horizontal {

    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    width: calc(100vw - 16px) !important;
    max-width: 100% !important;
    gap: 9px !important;
    padding: 0 10px 4px 10px !important;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  
}

.profile-toc-btn {

    width: calc(100% - 6px) !important;
    min-width: 0 !important;
    justify-self: center !important;
    font-size: 0.78rem !important;
    padding: 10px 0 !important;
  
}

.profile-balance-actions {

    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 11px !important;
    width: calc(100vw - 16px) !important;
    max-width: 100% !important;
    padding: 0 10px !important;
    bottom: calc(156px + env(safe-area-inset-bottom, 0px)) !important;
  
}

#depositBtn {

    grid-column: 2 !important;
  
}

#withdrawBtn {

    grid-column: 3 !important;
  
}

.profile-toc-btn {

    grid-column: auto !important;
  
}

.profile-toc-btn {

    width: calc(100% - 2px) !important;
    min-width: 0 !important;
    justify-self: center !important;
    max-width: none !important;
    font-size: 1rem !important;
    padding: 8px 0 !important;
    min-height: 42px !important;
  

}

#depositBtn {

    width: calc(100% - 2px) !important;
    min-width: 0 !important;
    justify-self: center !important;
    max-width: none !important;
    font-size: 1rem !important;
    padding: 8px 0 !important;
    min-height: 42px !important;
  

}

#withdrawBtn {

    width: calc(100% - 2px) !important;
    min-width: 0 !important;
    justify-self: center !important;
    max-width: none !important;
    font-size: 1rem !important;
    padding: 8px 0 !important;
    min-height: 42px !important;
  

}

}

/* From app.css */
@media (max-width: 440px) {

.positions-container {

    padding: 20px 12px 28px;
  
}

.table {

    min-width: 900px;
  
}}

/* From app.css */
@media (max-width: 440px) {

.industry-section-header {

    align-items: flex-start;
    flex-direction: column;
  
}

.watchlist-container {

    padding: 0 12px 28px;
  
}

.card-top {

    align-items: flex-start;
  
}

.symbol-subcopy {

    max-width: 440px;
  
}

}

/* From app.css */
@media (max-width: 440px) {

.info-demo {

    margin-bottom: 24px;
  
}

.info-hero h1 {

    font-size: 1.8rem !important;
  
}

.info-graph-wrap {

  height: 190px;
  width: 100%;
  margin-top: 12px;

}

.info-graph {

  width: 100%;
  height: 100%;
  display: block;

}

.info-grid-box {

  fill: #ffffff;
  stroke: rgba(15, 23, 42, 0.08);
  stroke-width: 1.2;

}

}

/* From hamilton-web.css */
@media (max-width: 440px) {
  .hamilton-chat-messages {
    padding-top: 64px !important;
  }

  .hamilton-app-header,
  .hamilton-workspace-banner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hamilton-chat-surface {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hamilton-composer {
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 24px;
  }
}

/* From systems.css */
@media (max-width: 440px) {
  .systems-shell .app-grid {
    grid-template-columns: 1fr !important;
  }

  .systems-shell .app-icon {
    width: min(240px, 76vw) !important;
    height: min(240px, 76vw) !important;
  }

  .systems-shell .support-form-row {
    flex-direction: column;
  }
}

/* From systems.css */
@media (max-width: 440px) {

  .systems-page-content,
  .systems-legal-page {
    text-align: center;
  }

  .systems-page-list {
    display: inline-block;
    text-align: left;
    padding-left: 22px;
  }

  .systems-shell .contact-popup-overlay {
    padding: 16px;
  }

  .systems-shell .contact-popup {
    padding: 24px 18px 20px;
    border-radius: 14px;
    width: calc(100% - 24px);
    max-width: 440px;
    margin: 16px auto;
  }

  .systems-shell .cpop-row {
    flex-direction: column;
    gap: 14px;
  }

  .systems-shell .contact-info,
  .systems-shell .contact-form-panel {
    padding: 24px 20px;
    max-width: 440px;
  }
}

/* From astreet.css */
@media (max-width: 440px) {
    .setup-page-container {
        padding: 1rem 0.75rem 2.5rem;
    }
    .setup-header {
        margin-bottom: 1.5rem;
    }
    .setup-header h2 {
        font-size: 1.4rem;
    }
    .setup-sidebar {
        padding: 1.25rem 1rem;
        gap: 1.5rem;
    }
    .setup-sidebar-section {
        padding-top: 1.5rem;
    }
    .setup-main {
        gap: 1.25rem;
    }
    .setup-panel {
        padding: 1.25rem 1rem;
    }
    .primary-email-address {
        font-size: 1.05rem;
        word-break: break-all;
    }
    .alias-item {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    .alias-item span {
        word-break: break-all;
        padding-right: 0.5rem;
    }
    .tab-btn {
        font-size: 0.95rem;
        padding: 0.75rem 0.5rem;
    }
    .server-settings-table th, 
    .server-settings-table td {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }
    .setting-value-cell span {
        word-break: break-all;
        padding-right: 0.5rem;
    }
}

/* From mailings.css */
@media (max-width: 440px) {
  .mailing-list-popup.is-hidden {
    transform: translateX(-50%) translateY(40px);
  }
}
