@media (min-width: 1040px) {
    .topbar {
        margin: 16px auto 0;
    }
}

@media (min-width: 940px) {
    .block {
        margin: 28px auto;
    }
}

@media (min-width: 440px) {
    .container {
        margin: 100px auto;
    }
}

@media (max-width: 940px) {

    .topbar {
        top: 10px;
        padding: 10px;
    }

    .topbar-content {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .brand-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .nav-buttons {
        display: none;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .nav-buttons.nav-open {
        display: flex;
    }

    .nav-buttons button {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .menu-toggle {
        display: block;
    }

    .btn-primary {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .btn-admin {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .admin-actions button {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .admin-buttons {
        flex-direction: column;
    }

    .admin-buttons button,
    .admin-key-buttons button,
    .admin-empty-block button,
    .admin-back-block button {
        width: 100%;
        padding: 12px;
        font-size: 15px;
        border-radius: var(--radius);
        box-sizing: border-box;
    }

    .user-actions button {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .stacked-action-buttons button {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .btn-user {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .user-buttons {
        flex-direction: column;
    }

    .user-buttons button {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .user-key-buttons button {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .app-toast-container {
        top: 92px;
        right: 0;
        gap: 8px;
    }

    .app-toast {
        gap: 10px;
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        min-height: 72px;
        padding: 13px 16px;
        font-size: 14px;
    }

    .app-toast-close {
        width: 26px;
        height: 26px;
    }

    .app-toast-close::before,
    .app-toast-close::after {
        width: 11px;
    }

    .locations {
        gap: 15px;
    }

    .location-card {
        min-height: 140px;
        padding: 12px;
    }

    .info-locations-block .location-card {
        width: 168px;
        height: 148px;
        flex-basis: 168px;
        min-height: 0;
        padding: 14px 12px;
    }

    .location-card img {
        width: 60px;
        height: 40px;
    }

    .info-locations-block .location-card img {
        width: 66px;
        height: 42px;
        flex-basis: 42px;
    }

    .location-card span {
        font-size: 14px;
    }

    .location-city {
        font-size: 13px;
    }

    .social-links,
    .support-links {
        grid-template-columns: repeat(auto-fit, 168px);
        gap: 15px;
    }

    .social-link-card,
    .support-link-card {
        width: 168px;
        height: 148px;
        padding: 14px 12px;
    }

    .social-link-card img,
    .support-link-card img {
        width: 60px;
        height: 60px;
        flex-basis: 60px;
    }

    .social-link-card span,
    .support-link-card span {
        font-size: 14px;
    }

    .admin-users-meta {
        flex-direction: column;
    }

    .admin-users-filters-grid {
        grid-template-columns: 1fr;
    }

    .admin-users-filters-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-users-filters-actions button {
        width: 100%;
    }

    .admin-users-table {
        min-width: 0;
    }

    .admin-users-table thead {
        display: none;
    }

    .admin-users-table,
    .admin-users-table tbody,
    .admin-users-table tr,
    .admin-users-table td {
        display: block;
        width: 100%;
    }

    .admin-users-table tr {
        padding: 14px 16px;
        margin-bottom: 14px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: var(--surface-soft);
    }

    .admin-users-table td {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        padding: 10px 0;
        border-bottom: 1px solid var(--border);
        text-align: right;
    }

    .admin-users-table td:last-child {
        border-bottom: none;
    }

    .admin-users-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--text-muted);
        text-align: left;
    }

    .admin-users-table td.admin-users-menu-cell::before {
        content: "";
        display: none;
    }

    .admin-users-email {
        overflow-wrap: anywhere;
    }

    .admin-page-pagination-controls {
        flex-direction: column;
    }

    .admin-page-pagination-controls button {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .subscription-purchase-grid {
        grid-template-columns: 1fr;
    }

    .profile-body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .dashboard-hero,
    .admin-dashboard-hero,
    .info-dashboard-hero,
    .free-keys-hero,
    .settings-dashboard-hero,
    .subscription-dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-summary-grid,
    .free-keys-summary-grid,
    .dashboard-grid,
    .admin-dashboard-grid,
    .info-dashboard-grid,
    .free-keys-list,
    .settings-dashboard-grid {
        grid-template-columns: 1fr;
        margin-left: 14px;
        margin-right: 14px;
    }

    .admin-plan-detail-grid,
    .admin-plan-form-grid,
    .admin-plan-traffic-fields,
    .admin-location-detail-grid,
    .admin-location-form-grid,
    .admin-social-link-detail-grid,
    .admin-social-link-form-grid,
    .admin-support-link-detail-grid,
    .admin-support-link-form-grid,
    .admin-site-detail-grid,
    .admin-user-detail-grid,
    .admin-user-form-grid,
    .admin-payment-rows,
    .admin-free-key-detail-grid,
    .admin-free-key-form-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-side {
        order: -1;
    }

    .dashboard-action-panel {
        position: static;
    }

    .subscription-plan-list {
        border-right: none;
        border-bottom: none;
    }

    .admin-dashboard-grid > .admin-dashboard-card:last-child:nth-child(odd),
    .info-dashboard-grid > .info-dashboard-card:last-child:nth-child(odd),
    .free-keys-list > .free-key-card:last-child:nth-child(odd),
    .settings-dashboard-grid > .settings-dashboard-card:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .home-topbar {
        width: auto;
        max-width: none;
        margin-inline: 16px;
    }

    .home-nav {
        padding-top: 4px;
        border-top: 1px solid var(--home-line);
    }

    .home-nav .home-nav-cta {
        margin-left: 0;
    }

    .home-page {
        width: min(calc(100% - 32px), 760px);
    }

    .home-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 48px;
        padding: 62px 0 52px;
    }

    .home-hero-content {
        max-width: 720px;
    }

    .home-hero-visual {
        width: min(100%, 620px);
        justify-self: center;
    }

    .home-facts article {
        align-items: flex-start;
        padding-inline: 20px;
    }

    .home-section {
        margin-top: 94px;
    }

    .home-section-head {
        grid-template-columns: 150px minmax(0, 1fr);
        gap: 28px;
    }

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

    .home-feature-card:last-child {
        min-height: 280px;
        grid-column: 1 / -1;
    }

    .home-feature-card h3 {
        margin-top: 32px;
    }

    .home-access-grid,
    .home-faq {
        grid-template-columns: 1fr;
    }

    .home-access-free {
        min-height: 360px;
    }

    .home-access-free h3 {
        margin-top: 64px;
    }

    .home-faq {
        gap: 40px;
    }

    .home-faq-intro {
        position: static;
        max-width: 620px;
    }

    .home-final-cta {
        align-items: flex-start;
        flex-direction: column;
        margin-top: 94px;
    }

    .home-footer {
        grid-template-columns: 1fr auto;
    }

    .home-footer p {
        grid-column: 1 / -1;
        grid-row: 2;
        text-align: left;
    }

    .home-shell .home-hero-actions .btn-primary,
    .home-shell .home-access-card .btn-primary,
    .home-shell .home-final-cta .btn-primary,
    .home-shell .home-faq-intro .btn-primary {
        width: auto;
    }
}

@media (max-width: 640px) {
    .topbar {
        margin: 12px 12px 0;
        border-radius: var(--radius);
    }

    .topbar .brand-link {
        flex: 1 1 auto;
    }

    .topbar .brand-link > span:last-child {
        min-width: 0;
    }

    .topbar .brand {
        display: block;
        overflow: visible;
        font-size: 15px;
        line-height: 1.15;
        letter-spacing: 0;
        text-overflow: clip;
        white-space: normal;
    }

    .hero {
        padding: 54px 18px 34px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero-logo {
        width: 132px;
    }

    .block {
        margin: 20px 14px;
        padding: 26px 20px;
    }

    .block h2 {
        font-size: 22px;
    }

    .container {
        width: min(400px, calc(100% - 28px));
        margin: 64px auto;
        padding: 28px 20px;
    }

    .profile-row,
    .user-device-row {
        flex-direction: column;
        gap: 4px;
        text-align: left;
    }

    .device-user-agent-value {
        max-width: 100%;
        text-align: left;
    }

    .subscription-price-row,
    .subscription-price-total {
        flex-direction: column;
        gap: 4px;
    }

    .subscription-price-row strong,
    .subscription-price-total strong {
        white-space: normal;
    }

    .admin-payment-card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-payment-row-value {
        max-width: 100%;
        text-align: left;
    }

    .profile-body {
        padding: 10px 0 34px;
    }

    .dashboard-hero h1,
    .admin-dashboard-hero h1,
    .info-dashboard-hero h1,
    .free-keys-hero h1,
    .settings-dashboard-hero h1,
    .subscription-dashboard-hero h1 {
        font-size: 28px;
    }

    .dashboard-profile-copy {
        width: 100%;
    }

    .dashboard-profile-email {
        font-size: 22px;
    }

    .dashboard-summary-grid,
    .free-keys-summary-grid,
    .dashboard-grid,
    .admin-dashboard-grid,
    .info-dashboard-grid,
    .free-keys-list,
    .settings-dashboard-grid {
        margin-left: 14px;
        margin-right: 14px;
        gap: 14px;
    }

    .dashboard-summary-card,
    .admin-dashboard-card,
    .info-dashboard-card,
    .free-key-card,
    .settings-dashboard-card {
        padding: 18px;
    }

    .dashboard-detail-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-card-head,
    .free-key-card-head,
    .free-key-card-footer,
    .admin-plan-card-head,
    .admin-location-card-head,
    .admin-social-link-card-head,
    .admin-support-link-card-head,
    .admin-site-status-card-head,
    .admin-user-summary-head,
    .admin-user-subscription-card-head,
    .admin-payment-card-head,
    .dashboard-connect-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-site-status-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-site-status-actions button {
        width: 100%;
    }

    .admin-user-subscription-actions {
        flex-direction: column;
    }

    .admin-user-subscription-actions button,
    .admin-user-inline-form .admin-buttons button {
        width: 100%;
    }

    .admin-location-flag-link,
    .admin-social-link-logo-link,
    .admin-support-link-logo-link {
        grid-column: auto;
    }

    .dashboard-connect-box a,
    .dashboard-connect-box button {
        width: 100%;
    }

    .subscription-plan-list,
    .subscription-purchase-form {
        padding: 20px;
    }

    .subscription-purchase-block {
        padding: 20px;
    }

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

    .free-keys-hero-actions,
    .free-keys-hero-actions button,
    .free-key-card-footer .user-key-buttons,
    .free-key-card-footer .user-key-buttons button {
        width: 100%;
    }

    .admin-dashboard-card,
    .info-dashboard-card,
    .settings-dashboard-card {
        min-height: 0;
    }

    .brand-link {
        gap: 8px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .brand-subtitle {
        display: none;
    }

    html,
    body {
        background-attachment: scroll;
    }

    .home-topbar {
        margin-inline: 12px;
        border-radius: 16px;
    }

    .home-page {
        width: calc(100% - 28px);
        padding-bottom: 24px;
    }

    .home-hero {
        gap: 38px;
        padding: 46px 0 42px;
    }

    .home-hero h1 {
        font-size: clamp(42px, 13vw, 58px);
        line-height: 0.97;
    }

    .home-hero-text {
        margin-top: 22px;
        font-size: 16px;
        line-height: 1.65;
    }

    .home-hero-actions,
    .home-shell .home-hero-actions .btn-primary,
    .home-hero-actions .btn-outline {
        width: 100%;
    }

    .home-trust-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

    .home-trust-row span:last-child {
        grid-column: 1 / -1;
    }

    .home-hero-visual {
        min-height: 520px;
        padding: 20px;
        border-radius: 25px;
    }

    .home-hero-visual::after {
        inset: 7px;
        border-radius: 19px;
    }

    .home-logo-stage {
        min-height: 270px;
    }

    .home-hero-logo {
        width: 148px;
    }

    .home-logo-orbit-one {
        width: 210px;
        height: 210px;
    }

    .home-logo-orbit-two {
        width: 260px;
        height: 260px;
    }

    .home-floating-note {
        display: none;
    }

    .home-hero-logo {
        animation: none;
    }

    .home-connection-card {
        min-height: 68px;
        padding: 13px;
    }

    .home-connection-card strong,
    .home-panel-grid strong {
        font-size: 14px;
    }

    .home-facts {
        grid-template-columns: 1fr;
    }

    .home-facts article {
        padding: 19px 4px;
    }

    .home-facts article + article {
        border-top: 1px solid var(--home-line-strong);
        border-left: none;
    }

    .home-facts strong {
        min-width: 38px;
        font-size: 34px;
    }

    .home-facts span {
        max-width: none;
    }

    .home-section {
        margin-top: 76px;
        scroll-margin-top: 96px;
    }

    .home-section-head {
        grid-template-columns: 1fr;
        gap: 9px;
        margin-bottom: 28px;
    }

    .home-section-index {
        padding-top: 0;
    }

    .home-section-head h2,
    .home-locations-head h2,
    .home-faq-intro h2,
    .home-final-cta h2 {
        font-size: clamp(34px, 10.5vw, 46px);
    }

    .home-section-head p,
    .home-locations-head p,
    .home-faq-intro p {
        margin-top: 14px;
        font-size: 15px;
    }

    .home-feature-grid {
        grid-template-columns: 1fr;
    }

    .home-feature-card,
    .home-feature-card:last-child {
        min-height: 280px;
        grid-column: auto;
        padding: 22px;
        border-radius: 19px;
    }

    .home-feature-mark {
        margin-top: 24px;
    }

    .home-feature-card h3 {
        margin-top: 28px;
    }

    .home-access-card {
        min-height: 450px;
        padding: 26px 22px;
        border-radius: 22px;
    }

    .home-access-free {
        min-height: 350px;
    }

    .home-access-card h3 {
        margin-top: 58px;
        font-size: 36px;
    }

    .home-access-topline {
        align-items: flex-start;
    }

    .home-access-price {
        text-align: right;
    }

    .home-shell .home-access-button {
        width: 100%;
    }

    .home-locations-section {
        padding: 26px 20px;
        border-radius: 23px;
    }

    .home-locations-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 22px;
        margin-bottom: 26px;
    }

    .home-locations {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-locations .home-location-card {
        width: 100%;
        min-width: 0;
        min-height: 148px;
        padding: 14px 10px;
    }

    .home-connection-card,
    .home-panel-grid > div,
    .home-locations .home-location-card {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .home-locations .data-loading,
    .home-locations .home-locations-state {
        grid-column: 1 / -1;
    }

    .home-step-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .home-step-card {
        min-height: 0;
        flex-direction: row;
        gap: 22px;
        padding: 0 0 38px;
    }

    .home-step-card:not(:last-child)::after {
        top: 54px;
        right: auto;
        bottom: 0;
        left: 27px;
        width: 1px;
        height: auto;
    }

    .home-step-number {
        width: 54px;
        height: 54px;
        flex: 0 0 54px;
        margin: 0;
        box-shadow: 0 0 0 7px var(--home-bg);
    }

    .home-step-card h3 {
        font-size: 21px;
    }

    .home-faq {
        gap: 30px;
        padding: 26px 20px;
        border-radius: 22px;
    }

    .home-shell .home-faq-intro .btn-primary {
        width: 100%;
    }

    .home-faq-list summary {
        padding-block: 21px;
        font-size: 18px;
    }

    .home-final-cta {
        gap: 28px;
        margin-top: 76px;
        padding: 30px 22px;
        border-radius: 23px;
    }

    .home-shell .home-final-button {
        width: 100%;
    }

    .home-footer {
        width: calc(100% - 28px);
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: 36px;
        padding-bottom: 28px;
    }

    .home-footer p {
        grid-column: auto;
        grid-row: auto;
    }

    .home-footer-links {
        align-items: flex-start;
        flex-direction: column;
        justify-content: flex-start;
        gap: 10px;
    }

}

@media (max-width: 380px) {
    .home-panel-grid,
    .home-locations {
        grid-template-columns: 1fr;
    }

    .home-locations .data-loading,
    .home-locations .home-locations-state {
        grid-column: auto;
    }

    .home-visual-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .home-logo-stage {
        min-height: 235px;
    }

    .home-logo-orbit-two {
        width: 230px;
        height: 230px;
    }
}
