.umpire-profile-page .profile-main {
    width: min(100% - 32px, 1320px);
}

.profile-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    align-items: center;
    justify-content: space-between;
}

.profile-nav .summary-back-link {
    margin-bottom: 18px;
}

.profile-summary-link {
    color: var(--summary-muted);
    font-size: .84rem;
    font-weight: 800;
    text-decoration: none;
}

.profile-summary-link:hover,
.profile-summary-link:focus-visible {
    color: var(--summary-blue);
    text-decoration: underline;
}

.profile-hero h2 {
    overflow-wrap: anywhere;
}

.profile-search-panel {
    position: relative;
    z-index: 3;
    width: min(100% - 56px, 980px);
    margin: -28px auto 0;
    padding: 20px;
    border: 1px solid var(--summary-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(35, 55, 88, .13);
}

.profile-search-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 130px auto;
    gap: 10px;
    align-items: end;
}

.profile-form-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.profile-form-field label {
    color: var(--summary-muted);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.profile-search-form input,
.profile-search-form select,
.profile-search-button {
    min-height: 48px;
    border-radius: 9px;
    font: inherit;
}

.profile-search-form input,
.profile-search-form select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #c8d3e1;
    background: #fff;
    color: var(--summary-ink);
}

.profile-search-form input:focus,
.profile-search-form select:focus {
    border-color: var(--summary-blue);
    outline: 3px solid rgba(33, 84, 163, .14);
}

.profile-autocomplete {
    position: relative;
    min-width: 0;
}

.profile-autocomplete-toggle {
    position: absolute;
    z-index: 2;
    top: 2px;
    right: 2px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0 7px 7px 0;
    background: transparent;
    color: var(--summary-muted);
    cursor: pointer;
}

.profile-autocomplete-toggle::after {
    position: absolute;
    top: 16px;
    left: 17px;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    content: "";
    transform: rotate(45deg);
}

.profile-autocomplete-toggle:hover,
.profile-autocomplete-toggle:focus-visible,
.profile-autocomplete-toggle[aria-expanded="true"] {
    outline: 0;
    background: #eaf1fb;
    color: var(--summary-blue);
}

.umpire-profile-page .profile-autocomplete input#search-input {
    height: 48px;
    margin: 0;
    padding: 10px 48px 10px 12px;
}

.profile-autocomplete-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    max-height: min(42vh, 340px);
    overflow-y: auto;
    border: 1px solid #bac8d9;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(20, 35, 75, .2);
    overscroll-behavior: contain;
}

.profile-autocomplete-menu[hidden] {
    display: none;
}

.profile-autocomplete-option {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border: 0;
    border-bottom: 1px solid #e3e8ef;
    background: #fff;
    color: var(--summary-ink);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-align: left;
}

.profile-autocomplete-option:last-child {
    border-bottom: 0;
}

.profile-autocomplete-option:hover,
.profile-autocomplete-option:focus-visible,
.profile-autocomplete-option.is-active {
    outline: 0;
    background: #eaf1fb;
    color: var(--summary-blue);
}

.profile-autocomplete-empty {
    padding: 14px;
    color: var(--summary-muted);
}

.profile-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    white-space: nowrap !important;
}

.profile-search-button {
    padding: 10px 20px;
    border: 2px solid var(--summary-blue);
    background: var(--summary-blue);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}

.profile-search-button:hover,
.profile-search-button:focus-visible {
    border-color: var(--summary-navy);
    background: var(--summary-navy);
}

.profile-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    margin: 22px auto 0;
}

.profile-stat-grid .summary-stat-card:first-child { border-top: 5px solid var(--summary-blue); }
.profile-career-total { border-top: 5px solid var(--summary-gold); }
.profile-finals-total { border-top: 5px solid var(--summary-teal); }
.profile-grand-finals-total { border-top: 5px solid var(--summary-red); }

@media (max-width: 900px) {
    .profile-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.profile-empty-state {
    margin-top: 28px;
    padding: clamp(28px, 6vw, 54px);
    border: 1px solid var(--summary-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(35, 55, 88, .06);
    text-align: center;
}

.profile-empty-state h3 {
    margin: 0;
    color: var(--summary-ink);
    font-size: 1.35rem;
}

.profile-empty-state p {
    max-width: 620px;
    margin: 9px auto 0;
    color: var(--summary-muted);
    line-height: 1.55;
}

.profile-appointments-table {
    min-width: 1120px !important;
}

.profile-appointments-table th:nth-child(1) { width: 10%; }
.profile-appointments-table th:nth-child(2) { width: 18%; }
.profile-appointments-table th:nth-child(3) { width: 22%; }
.profile-appointments-table th:nth-child(4) { width: 13%; }
.profile-appointments-table th:nth-child(5) { width: 9%; }
.profile-appointments-table th:nth-child(6) { width: 20%; }
.profile-appointments-table th:nth-child(7) { width: 8%; }

.profile-matchup {
    color: var(--summary-ink);
    font-weight: 800;
}

.profile-final-badge {
    display: block;
    width: fit-content;
    margin-top: 6px;
    padding: 4px 7px;
    border-radius: 6px;
    background: #fff1c7;
    color: #755300;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1.2;
}

.profile-time,
.profile-venue,
.profile-muted {
    color: var(--summary-muted);
}

.profile-role-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.profile-role-pill {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 999px;
    background: #eaf1fb;
    color: var(--summary-navy);
    font-size: .7rem;
    font-weight: 800;
    text-transform: capitalize;
}

.profile-crew-group + .profile-crew-group {
    margin-top: 5px;
}

.profile-crew-label {
    color: var(--summary-muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.profile-crew-group a,
.profile-person-link {
    color: var(--summary-blue);
    font-weight: 700;
    text-decoration: none;
}

.profile-crew-group a:hover,
.profile-crew-group a:focus-visible,
.profile-person-link:hover,
.profile-person-link:focus-visible {
    color: var(--summary-navy);
    text-decoration: underline;
}

.profile-current-person {
    color: var(--summary-ink);
    font-weight: 800;
}

.profile-insights-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.profile-insight-panel {
    min-width: 0;
}

.profile-insight-panel .summary-table {
    min-width: 500px;
}

.profile-panel-total {
    display: inline-flex;
    margin: 4px 0 16px;
    padding: 6px 9px;
    border-radius: 7px;
    background: #eaf1fb;
    color: var(--summary-navy);
    font-size: .78rem;
    font-weight: 800;
}

.profile-data-note {
    margin-top: 30px;
}

.profile-mobile-scroll-hint {
    display: none;
}

@media (max-width: 820px) {
    .profile-search-form {
        grid-template-columns: minmax(0, 1fr) 120px;
    }

    .profile-search-button {
        grid-column: 1 / -1;
    }

    .profile-insights-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .umpire-profile-page .profile-main {
        width: min(100% - 20px, 1320px);
    }

    .profile-nav {
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
    }

    .profile-search-panel {
        width: calc(100% - 20px);
        padding: 15px;
    }

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

    .profile-search-button {
        grid-column: auto;
    }

    .profile-stat-grid {
        grid-template-columns: 1fr 1fr;
        padding: 0;
    }

    .profile-mobile-scroll-hint {
        display: block;
        margin-top: 4px;
        color: var(--summary-blue);
        font-size: .78rem;
        font-weight: 700;
    }

    .profile-insight-panel .summary-table {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed;
    }

    .profile-insight-panel .summary-table th,
    .profile-insight-panel .summary-table td {
        padding: 9px 10px;
        vertical-align: top;
    }

    .profile-insight-panel .summary-table th:first-child,
    .profile-insight-panel .summary-table td:first-child {
        width: auto;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .profile-insight-panel .summary-table .number {
        width: 104px;
        white-space: nowrap;
    }

    .profile-insight-panel .summary-table th.number {
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .profile-appointments-table {
        min-width: 620px !important;
        width: 200% !important;
        table-layout: fixed;
        font-size: .78rem !important;
        line-height: 1.32;
    }

    .profile-appointments-table th,
    .profile-appointments-table td {
        padding: 8px 9px !important;
        vertical-align: top;
    }

    .profile-appointments-table th:nth-child(4),
    .profile-appointments-table td:nth-child(4),
    .profile-appointments-table th:nth-child(5),
    .profile-appointments-table td:nth-child(5) {
        display: none;
    }

    .profile-appointments-table th:nth-child(1) { width: 13%; }
    .profile-appointments-table th:nth-child(2) { width: 22%; }
    .profile-appointments-table th:nth-child(3) { width: 28%; }
    .profile-appointments-table th:nth-child(6) { width: 27%; }
    .profile-appointments-table th:nth-child(7) { width: 10%; }

    .profile-appointments-table th:first-child,
    .profile-appointments-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        background: #fff;
        box-shadow: 6px 0 10px rgba(20, 35, 75, .08);
    }

    .profile-appointments-table th:first-child {
        z-index: 2;
        background: var(--summary-navy);
    }

    .profile-appointments-table tbody tr:nth-child(even) td:first-child {
        background: var(--summary-soft);
    }

    .profile-crew-group + .profile-crew-group {
        margin-top: 3px;
    }

    .profile-crew-label {
        font-size: .62rem;
    }
}

@media (max-width: 390px) {
    .profile-stat-grid {
        grid-template-columns: 1fr;
    }
}
