/* Shared page atmosphere, followed by phone-specific refinements. */
html:not(.dark-mode) body {
    /* A broad, more pronounced blue glow that fades into the neutral page surface. */
    background: radial-gradient(ellipse 90% 150% at top left, rgba(147, 197, 253, .76) 0%, rgba(191, 219, 254, .42) 48%, rgba(244, 246, 248, 0) 88%), #f4f6f8;
    background-attachment: fixed;
}

/* Reuse the supplied SVG through a mask so each control's CSS color is retained. */
.dropdown-arrow {
    display: inline-block;
    flex: 0 0 auto;
    width: .7em;
    height: .7em;
    background-color: currentColor;
    -webkit-mask: url("dropdown-arrow.bfcc3920696d.svg") center / contain no-repeat;
    mask: url("dropdown-arrow.bfcc3920696d.svg") center / contain no-repeat;
}

/* Phone refinements */
@media (max-width: 700px) {
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    body {
        box-sizing: border-box;
        min-height: 100dvh;
        min-width: 0;
        overflow-x: hidden;
        padding: 16px;
    }

    button,
    input,
    select,
    textarea {
        font-size: 16px; /* Prevents iOS from zooming into form fields. */
    }

    /* Home */
    .page-shell {
        padding: 4px 0 28px;
    }

    .topbar {
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }

    .logo-wrap img {
        height: 58px;
    }

    .hero-grid {
        gap: 14px;
    }

    .hero-card {
        min-height: auto;
        padding: 25px 22px;
        border-radius: 20px;
        gap: 28px;
    }

    .primary-title {
        font-size: clamp(2.6rem, 16vw, 3.5rem);
    }

    .primary-subtitle {
        font-size: 1rem;
    }

    .card-copy {
        line-height: 1.6;
    }

    .cta-btn {
        width: 100%;
        min-height: 46px;
    }

    /* Shared application headers and content surfaces */
    .master-container {
        width: 100%;
        padding: 8px 0 28px;
    }

    .header-flex {
        align-items: flex-start;
        flex-direction: column;
        gap: 13px;
        margin-bottom: 22px;
    }

    h1,
    h1.page-title {
        font-size: clamp(1.85rem, 9vw, 2.35rem);
        line-height: 1.05;
    }

    .back-link {
        min-height: 42px;
    }

    .profile-card {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .section-title {
        font-size: 1.12rem;
        margin-top: 26px;
        margin-bottom: 17px;
    }

    .modern-radio {
        flex-wrap: wrap;
        gap: 10px 16px;
    }

    .select2-container {
        max-width: 100%;
    }

    .select2-dropdown {
        max-width: calc(100vw - 32px);
    }

    /* Explore and saved opportunity listings */
    .brand-logo {
        position: static !important;
        display: inline-block;
        width: fit-content;
        text-align: left;
        margin: 0 0 8px;
    }

    .brand-logo img {
        width: 170px !important;
        height: auto !important;
    }

    /* Keep the home logo compact on narrow screens. */
    .topbar .home-logo {
        flex: 0 1 auto;
        margin-bottom: 0;
    }

    .topbar .home-logo img {
        width: clamp(120px, 42vw, 170px) !important;
    }

    .auth-nav {
        justify-content: flex-end;
        margin: -68px 0 20px;
    }

    .auth-nav .dropdown,
    .auth-nav .dropdown-button {
        width: auto;
    }

    .auth-nav .dropdown-button {
        min-height: 38px;
        padding: 8px 11px;
        white-space: nowrap;
    }

    .auth-nav .dropdown-content {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        width: min(260px, calc(100vw - 32px));
        min-width: min(220px, calc(100vw - 32px));
        max-width: calc(100vw - 32px);
        max-height: min(360px, calc(100vh - 32px));
        overflow-y: auto;
    }

    .page-title {
        margin-top: 50px;
        text-align: center;
    }

    .page-tagline {
        font-size: .68rem;
        line-height: 1.45;
        letter-spacing: .08em !important;
    }

    .filter-panel {
        padding: 20px 16px;
        margin-bottom: 36px;
        border-radius: 16px;
    }

    input[name="search"] {
        min-height: 48px;
        margin-bottom: 16px;
        padding: 12px 14px;
    }

    .filter-container {
        align-items: stretch;
        gap: 10px;
    }

    .filter-container > * {
        width: 100%;
    }

    .sort-box {
        justify-content: flex-start;
        width: fit-content !important;
        min-height: 40px;
        padding: 4px 8px;
        gap: 5px;
        font-size: .78rem;
    }

    .sort-box select {
        font-size: .78rem;
    }

    .filter-group,
    .dropdown,
    .dropdown-button {
        width: 100%;
    }

    .filter-group .dropdown-button,
    .dropdown-button {
        min-height: 44px;
        text-align: left;
    }

    .filter-group .dropdown-content {
        position: static;
        width: 100%;
        max-height: 220px;
        margin-top: 7px;
        box-shadow: none;
    }

    .view-selector {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        margin-top: 16px;
        
    }

    .view-button {
        width: auto !important;
        height: 48px !important;
        min-height: 48px;
        flex: 0 1 auto;
        padding: 6px 8px;
        font-size: .94rem;
        letter-spacing: .015em;
        white-space: nowrap;
    }

    .button-group {
        flex-direction: column;
        gap: 10px;
        margin-top: 24px;
    }

    .button-group .btn-submit,
    .button-group .btn-reset,
    .btn-submit {
        width: 100%;
        min-height: 42px;
        padding: 8px 14px;
        box-sizing: border-box;
        justify-content: center;
    }

    .button-group .preferences-button {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .opportunities-grid {
        gap: 16px;
        margin-top: 16px;
    }

    .opp-card {
        padding: 19px;
        border-radius: 16px;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-inst {
        line-height: 1.45;
    }

    .card-specs {
        padding: 11px 12px;
        margin-bottom: 16px;
    }

    .card-specs p {
        display: block;
        margin: 8px 0;
    }

    .card-specs p span {
        display: block;
        margin-top: 2px;
    }

    .btn-know-more {
        width: 100%;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .results-count,
    .subtitle {
        font-size: .95rem;
        line-height: 1.5;
        margin-bottom: 18px;
    }

    /* Progress board becomes a deliberate horizontal board, not a squeezed grid. */
    .kanban-board {
        grid-template-columns: repeat(4, minmax(272px, 82vw));
        gap: 14px;
        margin: 0 -16px;
        padding: 4px 16px 18px;
        scroll-snap-type: x proximity;
        scrollbar-color: #94a3b8 transparent;
    }

    .kanban-col {
        min-width: 0;
        padding: 14px;
        scroll-snap-align: start;
    }

    .mini-card {
        padding: 14px;
    }

    /* Progress dashboard: preserve the board interaction while making the
       header, actions, and cards comfortable to use on a phone. */
    .progress-dashboard-page .master-container {
        padding: 4px 0 28px;
    }

    .progress-dashboard-page .header-flex {
        gap: 12px;
        margin-bottom: 14px;
    }

    .progress-dashboard-page .header-flex h1 {
        max-width: calc(100% - 108px);
        font-size: clamp(1.8rem, 8.5vw, 2.2rem);
    }

    .progress-dashboard-page .header-flex > div[style] {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px !important;
        width: 100%;
        align-items: stretch !important;
    }

    .progress-dashboard-page #clear-tracking-form {
        display: block !important;
        width: 100%;
    }

    .progress-dashboard-page .header-flex .back-link {
        box-sizing: border-box;
        width: 100%;
        min-height: 40px;
        justify-content: center;
        padding: 8px 9px;
        font-size: .8rem;
        line-height: 1.2;
        text-align: center;
    }

    .progress-dashboard-page .alert-success {
        margin-top: 0 !important;
        margin-bottom: 14px;
        padding: 11px 13px;
        border-radius: 12px;
        font-size: .85rem;
        line-height: 1.45;
    }

    .progress-dashboard-page .subtitle {
        margin-bottom: 14px;
        font-size: .88rem;
    }

    .progress-dashboard-page .kanban-board {
        grid-template-columns: repeat(4, minmax(286px, 84vw));
        gap: 12px;
        margin: 0 -16px;
        padding: 4px 16px 20px;
        scroll-padding-inline: 16px;
    }

    .progress-dashboard-page .kanban-col {
        padding: 13px;
        border-radius: 14px;
    }

    .progress-dashboard-page .col-header {
        margin-bottom: 13px;
        padding-bottom: 10px;
        font-size: .86rem;
    }

    .progress-dashboard-page .badge-count {
        min-width: 24px;
        padding: 3px 7px;
        box-sizing: border-box;
        text-align: center;
    }

    .progress-dashboard-page .mini-card {
        margin-bottom: 10px;
        padding: 13px;
        border-radius: 11px;
    }

    .progress-dashboard-page .mini-title {
        font-size: 1rem;
        line-height: 1.35;
    }

    .progress-dashboard-page .mini-inst {
        margin-bottom: 10px;
        line-height: 1.4;
    }

    .progress-dashboard-page .mini-btn {
        margin-bottom: 10px;
    }

    .progress-dashboard-page .mini-card select {
        min-height: 40px;
        padding: 8px !important;
        border-radius: 8px !important;
    }

    .progress-dashboard-page .empty-col {
        padding: 16px 12px;
        border-radius: 10px;
        font-size: .84rem;
        line-height: 1.45;
    }

    /* Detail and authentication flows */
    .detail-card {
        padding: 23px 18px;
        border-radius: 16px;
    }

    .detail-card p {
        padding: 12px 0;
        overflow-wrap: anywhere;
    }

    .official-link {
        width: 100%;
        min-height: 46px;
        justify-content: center;
        text-align: center;
    }

    /* Opportunity details: keep the secondary link compact and the primary
       external link fully contained within the card. */
    .opportunity-detail-page .back-link {
        min-height: 34px;
        align-items: center;
        margin-bottom: 16px;
        padding: 7px 10px;
        font-size: .82rem;
    }

    .opportunity-detail-page .official-link {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        min-height: 42px;
        margin-top: 20px;
        padding: 9px 12px;
        overflow-wrap: anywhere;
    }

    .auth-card,
    .card {
        box-sizing: border-box;
        width: 100%;
        max-width: none;
        margin: 58px auto 20px;
        padding: 25px 20px;
        border-radius: 16px;
    }

    .auth-card h2,
    .card h2 {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .form-group input,
    .auth-card input,
    .card input {
        width: 100%;
        min-height: 46px;
        box-sizing: border-box;
    }

    .auth-card .btn-submit,
    .card .btn {
        width: 100%;
        min-height: 46px;
    }

    #theme-toggle {
        top: 10px !important;
        right: 10px !important;
        padding: 7px 9px !important;
    }

    /* Login and sign-up: a single-column, comfortable phone flow. */
    .auth-page {
        display: block;
        min-height: 100dvh;
        height: auto !important;
        padding: 16px 16px 32px;
    }

    .auth-page .brand-logo {
        display: block;
        margin: 0;
        line-height: 0;
    }

    .auth-page .brand-logo img {
        width: clamp(138px, 42vw, 164px) !important;
    }

    .auth-page .auth-card {
        width: 100%;
        max-width: 480px;
        margin: 20px auto;
        padding: 28px 20px 24px;
        border-radius: 20px;
        box-shadow: 0 14px 32px rgba(15, 23, 42, .1);
    }

    .auth-page .auth-card h2 {
        margin-bottom: 24px;
        font-size: clamp(1.55rem, 8vw, 1.9rem);
        line-height: 1.1;
        letter-spacing: -.02em;
    }

    .auth-page .form-group {
        margin-bottom: 16px;
    }

    .auth-page .form-group label {
        margin-bottom: 7px;
        font-size: .86rem;
        letter-spacing: .01em;
    }

    .auth-page .form-group input {
        min-height: 50px;
        padding: 12px 14px;
        border-radius: 12px;
        font-size: 16px;
    }

    .auth-page .password-field {
        display: flex;
        align-items: center;
    }

    .auth-page .form-group .password-field input {
        padding-right: 82px;
    }

    .auth-page .password-toggle {
        right: 7px;
        min-height: 36px;
        padding: 7px 9px;
        border-radius: 8px;
        font-size: .78rem;
    }

    .auth-page .password-toggle:focus-visible {
        outline: 3px solid rgba(49, 130, 206, .25);
        outline-offset: 1px;
        text-decoration: none;
    }

    .auth-page .btn-submit {
        min-height: 52px;
        margin-top: 12px;
        padding: 12px 16px;
        border-radius: 12px;
        font-size: .98rem;
        box-shadow: 0 8px 18px rgba(49, 130, 206, .2);
    }

    .auth-page .auth-links {
        margin-top: 20px;
        font-size: .88rem;
        line-height: 1.75;
    }

    .auth-page .auth-links a {
        display: inline-block;
    }

    .auth-page .auth-links br {
        display: block;
        content: '';
        margin: 5px 0;
    }

    .auth-page .error-msg,
    .auth-page .errorlist,
    .auth-page .message {
        margin-bottom: 16px;
        border-radius: 10px;
        line-height: 1.45;
    }

    .auth-page .helptext {
        margin-top: 6px;
        line-height: 1.4;
    }

    html.dark-mode .auth-page .auth-card {
        box-shadow: 0 16px 36px rgba(0, 0, 0, .3) !important;
    }

    html.dark-mode .auth-page .password-toggle:focus-visible {
        outline-color: rgba(147, 197, 253, .3);
    }

    /* About Me: turn the desktop card rail into one clear phone form. */
    .about-me-page .master-container {
        padding: 4px 0 28px;
    }

    .about-me-page .header-flex {
        gap: 10px;
        margin-bottom: 18px;
    }

    .about-me-page .header-flex h1 {
        font-size: clamp(1.8rem, 9vw, 2.2rem);
    }

    .about-me-page .header-flex .back-link {
        min-height: 36px;
        padding: 7px 10px;
        font-size: .82rem;
    }

    .about-me-page > .master-container > form > .section-title {
        margin: 0 0 12px;
        padding-bottom: 8px;
        font-size: 1.08rem;
    }

    .about-me-page .profile-intro {
        margin-bottom: 16px;
        padding: 13px 14px;
        border-radius: 12px;
        font-size: .84rem;
        line-height: 1.5;
    }

    .about-me-page .cards-container {
        display: flex !important;
        flex-direction: column;
        gap: 14px !important;
        align-items: stretch !important;
        overflow: visible !important;
    }

    .about-me-page .cards-container > .profile-card {
        width: 100%;
        min-width: 0 !important;
        flex: none !important;
        padding: 20px 16px !important;
        border-radius: 16px;
    }

    .about-me-page .profile-card .section-title {
        margin: 0 0 17px;
        padding-bottom: 9px;
        font-size: 1.02rem;
        line-height: 1.35;
    }

    .about-me-page .profile-card .section-title:not(:first-child) {
        margin-top: 28px;
    }

    .about-me-page .form-row {
        margin-bottom: 17px;
    }

    .about-me-page .form-row label {
        margin-bottom: 7px;
        font-size: .86rem;
        line-height: 1.35;
    }

    .about-me-page .profile-text-input {
        height: 48px;
        border-radius: 10px;
        font-size: 16px;
    }

    .about-me-page .select2-container {
        width: 100% !important;
    }

    .about-me-page .select2-container--default .select2-selection--single,
    .about-me-page .select2-container--default .select2-selection--multiple {
        min-height: 48px;
        border-radius: 10px;
    }

    .about-me-page .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 46px;
        font-size: .9rem;
    }

    .about-me-page .select2-container--default .select2-selection--multiple .select2-selection__choice {
        max-width: calc(100% - 8px);
        margin-top: 4px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .about-me-page .modern-radio {
        gap: 10px 18px;
        margin-top: 4px;
    }

    .about-me-page .modern-radio div {
        min-height: 32px;
    }

    .about-me-page .form-actions {
        flex-direction: column;
        align-items: stretch !important;
        gap: 8px !important;
        margin-top: 16px !important;
    }

    .about-me-page .form-actions .btn-submit {
        width: 100%;
        min-height: 46px;
        margin: 0;
        padding: 10px 14px;
        border-radius: 10px;
    }

    .about-me-page .alert-success {
        margin-bottom: 16px;
        padding: 12px 14px;
        border-radius: 12px;
        font-size: .88rem;
        line-height: 1.45;
    }

    /* Opportunity list: make the dense search surface deliberately phone-first. */
    .opportunity-list-page .master-container {
        position: relative;
    }

    .opportunity-list-page .auth-nav {
        position: fixed;
        top: 5px;
        right: 5px;
        left: auto;
        z-index: 1001;
        margin: 0;
    }

    .opportunity-list-page .auth-nav .dropdown-button {
        max-width: 132px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .opportunity-list-page .auth-nav .dropdown-content {
        right: 0;
        left: auto;
    }

    body.opportunity-list-page #theme-toggle {
        top: 5px !important;
        right: auto !important;
        left: 5px !important;
    }

    .opportunity-list-page .discover-brand-header {
        box-sizing: border-box;
        width: 100%;
        margin: 0 auto 32px;
        padding: 45px 16px 0;
    }

    .opportunity-list-page .discover-brand-logo-frame {
        width: clamp(170px, 52vw, 205px);
    }

    .opportunity-list-page .discover-primary-tagline {
        margin: 8px 0 5px;
        font-size: clamp(.95rem, 4.2vw, 1.05rem);
    }

    .opportunity-list-page .page-tagline {
        font-size: clamp(.68rem, 2.9vw, .76rem);
        letter-spacing: .07em;
    }

    .opportunity-list-page .feature-advertise-row {
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 10px;
        margin: 22px 0 12px;
    }

    .opportunity-list-page .feature-advertise-row .results-count {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0;
        font-size: .82rem;
    }

    .opportunity-list-page .feature-advertise-row .btn-submit {
        flex: 0 0 auto;
        width: auto;
        min-height: 38px;
        padding: 8px 12px;
        font-size: .88rem;
        white-space: nowrap;
    }

    .opportunity-list-page .filter-panel {
        padding: 16px;
        margin-bottom: 28px;
    }

    .opportunity-list-page .filter-container {
        gap: 9px;
    }

    .opportunity-list-page .sort-box {
        width: 100% !important;
        min-height: 36px;
        justify-content: space-between;
        padding: 2px 10px;
    }

    .opportunity-list-page .sort-box select {
        min-height: 30px;
        max-width: 72%;
        text-align: right;
    }

    /* Added by the phone-only script; desktop keeps the original filter DOM. */
    .opportunity-list-page .filter-group.mobile-filter-enhanced {
        display: block;
        margin-top: 0;
        padding: 0;
        overflow: hidden;
        border-color: #d8e1ec;
        background: #f8fafc;
    }

    .opportunity-list-page .filter-group.mobile-filter-enhanced.is-mobile-filter-expanded {
        border-color: #93c5fd;
        background: #ffffff;
        box-shadow: 0 4px 10px rgba(37, 99, 168, .08);
    }

    .opportunity-list-page .filter-group.mobile-filter-enhanced > .group-title {
        display: none;
    }

    .opportunity-list-page .mobile-filter-group-toggle {
        display: flex;
        width: 100%;
        min-height: 46px;
        align-items: center;
        justify-content: space-between;
        padding: 0 13px;
        border: 0;
        background: transparent;
        color: #334155;
        cursor: pointer;
        font: inherit;
        font-size: .88rem;
        font-weight: 700;
        letter-spacing: .01em;
        text-align: left;
    }

    .opportunity-list-page .mobile-filter-group-toggle::after {
        content: '+';
        color: #2563a8;
        font-size: 1.25rem;
        font-weight: 500;
    }

    .opportunity-list-page .is-mobile-filter-expanded > .mobile-filter-group-toggle {
        border-bottom: 1px solid #e2e8f0;
    }

    .opportunity-list-page .is-mobile-filter-expanded > .mobile-filter-group-toggle::after {
        content: '\2212';
    }

    .opportunity-list-page .is-mobile-filter-collapsed > .dropdown {
        display: none;
    }

    .opportunity-list-page .is-mobile-filter-expanded > .dropdown {
        display: block;
        margin: 10px 12px 0;
        width: auto;
    }

    .opportunity-list-page .is-mobile-filter-expanded > .dropdown:last-of-type {
        margin-bottom: 12px;
    }

    .opportunity-list-page .button-group {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
        width: 100%;
        margin-top: 14px;
    }

    .opportunity-list-page .button-group > :first-child {
        grid-column: 1 / -1;
        min-height: 46px;
    }

    .opportunity-list-page .button-group .btn-submit,
    .opportunity-list-page .button-group .btn-reset {
        min-width: 0;
        min-height: 42px;
        padding: 8px;
        font-size: .82rem;
        text-align: center;
    }

    .opportunity-list-page .view-selector {
        flex-direction: row;
        justify-content: stretch;
        width: 100%;
        margin-top: 6px;
    }

    .opportunity-list-page .view-button {
        width: 100% !important;
        min-height: 42px;
        height: auto !important;
        font-size: .82rem;
    }

    .opportunity-list-page .filter-panel > form > .results-count {
        margin: 18px 0 5px;
        padding-top: 15px;
        border-top: 1px solid #e2e8f0;
        font-size: .88rem;
    }

    .opportunity-list-page .filter-summary {
        margin: 0;
        font-size: .8rem;
        line-height: 1.45;
    }

    .opportunity-list-page .opportunities-grid {
        gap: 12px;
    }

    .opportunity-list-page .opp-card {
        padding: 17px;
        border-radius: 14px;
    }

    .opportunity-list-page .btn-save-heart {
        display: grid;
        width: 40px;
        height: 40px;
        margin: -7px -7px 0 0;
        place-items: center;
    }

    .opportunity-list-page .card-badge-stack {
        padding-right: 4px;
    }

    .opportunity-list-page .card-specs {
        padding: 5px 12px;
    }

    .opportunity-list-page .card-specs p {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 10px;
        margin: 0;
        padding: 8px 0;
        border-bottom: 1px solid #e6edf5;
        line-height: 1.35;
    }

    .opportunity-list-page .card-specs p:last-child {
        border-bottom: 0;
    }

    .opportunity-list-page .card-specs p strong {
        font-size: .76rem;
    }

    .opportunity-list-page .card-specs p span {
        margin: 0;
        overflow-wrap: anywhere;
        text-align: right;
    }

    .opportunity-list-page .pagination {
        justify-content: space-between;
        gap: 5px;
    }

    .opportunity-list-page .pagination-link,
    .opportunity-list-page .pagination-disabled {
        padding-inline: 7px;
        font-size: .78rem;
    }

    html.dark-mode .opportunity-list-page .card-specs p {
        border-color: #223a58;
    }

    html.dark-mode .opportunity-list-page .filter-group.mobile-filter-enhanced {
        border-color: #223a58;
        background: #0b1627;
    }

    html.dark-mode .opportunity-list-page .filter-group.mobile-filter-enhanced.is-mobile-filter-expanded {
        border-color: #3b82f6;
        background: #0f1724;
    }

    html.dark-mode .opportunity-list-page .mobile-filter-group-toggle {
        color: #d9e6f7;
    }

    html.dark-mode .opportunity-list-page .is-mobile-filter-expanded > .mobile-filter-group-toggle {
        border-color: #223a58;
    }

    /* The Discover logo is lit by a broad, page-specific top-centre glow. */
    html:not(.dark-mode) body.opportunity-list-page {
        background: radial-gradient(circle 74vw at 50% 0%, rgba(191, 219, 254, .82) 0%, rgba(219, 234, 254, .5) 42%, rgba(191, 219, 254, .12) 66%, rgba(244, 246, 248, 0) 80%), #f4f6f8;
    }

    html.dark-mode body.opportunity-list-page {
        background: radial-gradient(ellipse 46% 15% at 50% 0%, rgba(191, 219, 254, .28) 0%, rgba(147, 197, 253, .15) 52%, transparent 100%), radial-gradient(ellipse 132% 31% at 50% 0%, rgba(96, 165, 250, .23) 0%, rgba(59, 130, 246, .11) 44%, transparent 82%), radial-gradient(ellipse 148% 42% at 50% 0%, rgba(30, 64, 175, .28) 0%, rgba(15, 23, 42, 0) 78%), var(--bg, #0b1220) !important;
    }

    /* A modestly wider light glow reaches the logo without dominating the header. */
    html:not(.dark-mode) body {
        background: radial-gradient(ellipse 106% 150% at top left, rgba(147, 197, 253, .76) 0%, rgba(191, 219, 254, .42) 48%, rgba(244, 246, 248, 0) 88%), #f4f6f8;
        background-size: 100vw 100dvh;
        background-repeat: no-repeat;
    }

    /* Use the same measured dark-mode glow on every phone page: wide enough
       for the logo, but much shallower than the original page-specific glow. */
    html.dark-mode body {
        background: radial-gradient(ellipse 94% 32% at top left, rgba(219, 234, 254, .62) 0%, rgba(147, 197, 253, .24) 48%, transparent 82%), radial-gradient(ellipse 100% 38% at top left, rgba(30, 64, 175, .42) 0%, rgba(15, 23, 42, 0) 74%), var(--bg, #0b1220) !important;
        background-attachment: fixed;
        background-size: 100vw 100dvh;
        background-repeat: no-repeat;
    }
}

@media (max-width: 380px) {
    .progress-dashboard-page .header-flex > div[style] {
        grid-template-columns: 1fr;
    }

    .profile-card,
    .detail-card,
    .auth-card,
    .card {
        padding-left: 16px;
        padding-right: 16px;
    }
}
