:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

html {
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --navy: #092940;
    --blue: #146091;
    --orange: #FF9C2E;
    --text: #081721;
    --text-muted: #595959;
    --border: #ebebeb;
    --bg: #f3f5fa;
    --surface: #ffffff;
    --lead-navy: var(--navy);
    --lead-blue: var(--blue);
    --lead-light: var(--bg);
    --lead-border: var(--border);
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text);
    --bs-link-color: var(--navy);
    --bs-link-hover-color: var(--orange);
    --bs-border-color: var(--border);
}

body {
    font-family: 'Open Sans', system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 18px;
    line-height: 1.75;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: var(--navy);
}

a:hover {
    color: var(--orange);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Raleway', system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

#header {
    top: 0;
    z-index: 1;
    background: #092940;
    transition: all 0.5s;
    z-index: 997;
    height: 70px;
}

#header.header-scrolled {
    box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
}

#header .logo {
    font-size: 30px;
    margin: 0;
    padding: 0;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#header .logo a {
    color: #fff;
}

#header .logo img {
    max-height: 40px;
}

.scrolled-offset {
    margin-top: 70px;
}

.navbar {
    padding: 0;
}

.navbar>ul {
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
    align-items: center;
}

.navbar .dropdown-menu {
    display: none;
}

.navbar .dropdown-menu.show {
    display: block;
}

.navbar li {
    position: relative;
}

.navbar a,
.navbar a:focus {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 10px 30px;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    transition: 0.3s;
}

.navbar a i,
.navbar a:focus i {
    font-size: 12px;
    line-height: 0;
    margin-left: 5px;
}

.navbar a:hover,
.navbar .active,
.navbar .active:focus,
.navbar li:hover>a {
    color: #146091;
}

.navbar .dropdown ul li {
    min-width: 200px;
}

.navbar .dropdown ul a {
    padding: 10px 20px;
    text-transform: none;
    color: #212529;
}

.navbar .dropdown ul a i {
    font-size: 12px;
}

.navbar .dropdown ul a:hover,
.navbar .dropdown ul .active:hover,
.navbar .dropdown ul li:hover>a {
    color: #146091;
}

.navbar .dropdown:hover>ul {
    opacity: 1;
    top: 100%;
    visibility: visible;
}

.navbar .dropdown .dropdown ul {
    top: 0;
    left: calc(100% - 30px);
    visibility: hidden;
}

.navbar .dropdown .dropdown:hover>ul {
    opacity: 1;
    top: 0;
    left: 100%;
    visibility: visible;
}

@media (max-width: 1366px) {
    .navbar .dropdown .dropdown ul {
        left: -90%;
    }

    .navbar .dropdown .dropdown:hover>ul {
        left: -100%;
    }
}

.mobile-nav-toggle {
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: none;
    line-height: 0;
    transition: 0.5s;
}

.mobile-nav-toggle.bi-x {
    color: #fff;
}

@media (max-width: 991px) {
    .mobile-nav-toggle {
        display: block;
    }

    .navbar ul {
        display: none;
    }
}

.navbar-mobile {
    position: fixed;
    overflow: hidden;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: #092940;
    transition: 0.3s;
    z-index: 999;
}

.navbar-mobile .mobile-nav-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    height: 300px;
}

.navbar-mobile ul {
    display: block;
    position: absolute;
    top: 55px;
    right: 15px;
    bottom: 15px;
    left: 15px;
    padding: 10px 0;
    background-color: #146091;
    overflow-y: auto;
    transition: 0.3s;
}

.navbar-mobile a,
.navbar-mobile a:focus {
    padding: 10px 20px;
    font-size: 15px;
    color: #fff;
}

.navbar-mobile a:hover,
.navbar-mobile .active,
.navbar-mobile li:hover>a {
    color: #092940;
}

.navbar-mobile .getstarted,
.navbar-mobile .getstarted:focus {
    margin: 15px;
}

.navbar-mobile .dropdown ul {
    position: static;
    display: none;
    margin: 10px 20px;
    padding: 10px 0;
    z-index: 99;
    opacity: 1;
    visibility: visible;
    background: #fff;
    box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
}

.navbar-mobile .dropdown ul li {
    min-width: 200px;
}

.navbar-mobile .dropdown ul a {
    padding: 10px 20px;
}

.navbar-mobile .dropdown ul a i {
    font-size: 12px;
}

.navbar-mobile .dropdown ul a:hover,
.navbar-mobile .dropdown ul .active:hover,
.navbar-mobile .dropdown ul li:hover>a {
    color: #146091;
}

.navbar-mobile .dropdown>.dropdown-active {
    display: block;
}

#site-header {
    background: var(--navy);
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 997;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

#site-header .navbar {
    height: 100%;
    padding: 0 30px;
}

#site-header .navbar-brand img {
    max-height: 40px;
}

#site-header .navbar .nav-link {
    display: flex;
    align-items: center;
    padding: 10px 0 10px 30px;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85) !important;
    white-space: nowrap;
    transition: color 0.3s;
    font-family: 'Raleway', system-ui, sans-serif;
}

#site-header .navbar .nav-link:hover,
#site-header .navbar .nav-link:focus-visible {
    color: var(--orange) !important;
}

#site-header .navbar .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0 !important;
    /* FIX 6: Override Bootstrap .nav-link padding */
    margin-left: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: border-color 0.3s, color 0.3s;
}

#site-header .navbar .social-link:hover {
    border-color: var(--orange);
    color: var(--orange) !important;
}

#site-header .navbar .social-link i {
    font-size: 15px;
    line-height: 0;
}

/* Hamburger toggler for mobile */
#site-header .navbar-toggler {
    border: none;
    padding: 4px;
}

#site-header .navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

#site-header .navbar-toggler .bi {
    font-size: 1.5rem;
    color: #fff;
}

#site-header .navbar-collapse.show,
#site-header .navbar-collapse.collapsing {
    background: var(--navy);
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    padding: 10px 30px 20px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    z-index: 996;
}

#site-header .navbar-collapse.show .nav-link,
#site-header .navbar-collapse.collapsing .nav-link {
    padding: 8px 0;
}

#intro {
    background: var(--blue);
    padding: 48px 40px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#intro::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 60%);
    opacity: 0.95;
    z-index: 0;
}

#intro .container {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

#intro h1 {
    color: #fff;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

#intro p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
    max-width: 620px;
    margin: 0 auto;
}

.alpha-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    position: sticky !important;
    top: 0px !important;
    z-index: 996;
}

.alpha-nav-label {
    font-size: 11px;
    font-family: 'Raleway', system-ui, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-right: 8px;
    padding: 10px 0;
}

.alpha-nav .nav-link,
.alpha-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-family: 'Raleway', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--navy) !important;
    border-radius: 4px;
    margin: 6px 0;
    padding: 0 !important;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}

.alpha-nav .nav-link:hover,
.alpha-nav a:hover,
.alpha-nav .nav-link:focus-visible,
.alpha-nav a:focus-visible {
    background: var(--navy);
    color: #fff !important;
    outline: 2px solid var(--orange);
    outline-offset: 1px;
}

main {
    flex: 1;
}

main.container {
    max-width: 980px;
    padding: 50px 40px 80px !important;
}

section[id^="letter-"] {
    scroll-margin-top: 100px;
    margin-bottom: 50px;
}


.section-title {
    text-align: center;
    padding-bottom: 30px;
}

.section-title h2 {
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-title h2::before {
    content: "";
    position: absolute;
    display: block;
    width: 120px;
    height: 1px;
    background: var(--blue);
    bottom: 1px;
    left: calc(50% - 60px);
}

.section-title h2::after {
    content: "";
    position: absolute;
    display: block;
    width: 40px;
    height: 3px;
    background: var(--orange);
    bottom: 0;
    left: calc(50% - 20px);
    border-radius: 2px;
}

#letter-pct .card {
    text-align: center;
    border: 1px solid var(--border) !important;
    background: var(--surface);
    border-radius: 4px !important;
    overflow: hidden;
    transition: all ease-in-out 0.3s;
}

#letter-pct .card:hover {
    border-color: transparent !important;
    box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-6px);
}

#letter-pct .card:hover .pct-header {
    background: var(--orange);
}

.pct-header {
    background: var(--blue);
    color: #fff;
    font-family: 'Raleway', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    padding: .75rem;
    border-radius: calc(0.375rem - 1px) calc(0.375rem - 1px) 0 0;
    transition: background 0.3s;
}

.pct-card {
    text-align: center;
    border: 1px solid var(--border);
    padding: 30px 16px 24px;
    background: var(--surface);
    border-radius: 4px;
    transition: all ease-in-out 0.3s;
}

.pct-card .icon {
    margin: 0 auto 16px;
    width: 54px;
    height: 54px;
    background: var(--blue);
    border-radius: 50%;
    border: 1px solid var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, border-color 0.3s;
}

.pct-card .icon span {
    color: #fff;
    font-family: 'Raleway', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
}

.pct-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.pct-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.pct-card:hover {
    border-color: #fff;
    box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-6px);
}

.pct-card:hover .icon {
    background: var(--orange);
    border-color: var(--orange);
}

.letter-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--blue);
}

.letter-section>.d-flex.border-bottom {
    border-bottom: 2px solid var(--blue) !important;
    margin-bottom: 20px;
    padding-bottom: 16px;
}

.letter-badge {
    width: 44px;
    height: 44px;
    background: var(--navy);
    color: #fff;
    font-family: 'Raleway', system-ui, sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

section[id^="letter-"]>.d-flex.border-bottom,
.letter-section>.d-flex.border-bottom {
    border-bottom: 2px solid var(--blue) !important;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.entry {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
    transition: background 0.2s;
}

.entry:last-child {
    border-bottom: none;
}

.entry-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--blue);
    border-radius: 50%;
    border: 2px solid var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    transition: background 0.3s, border-color 0.3s;
}

.entry-icon i {
    color: #fff;
    font-size: 18px;
    line-height: 0;
}

.entry:hover .entry-icon {
    background: #fff;
    border-color: var(--orange);
}

.entry:hover .entry-icon i {
    color: var(--orange);
}

.entry-body {
    margin-left: 20px;
    flex: 1;
}

dt {
    font-family: 'Raleway', system-ui, sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
    line-height: 1.3;
}

dt abbr {
    display: inline-block;
    font-family: 'Open Sans', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    background: var(--blue);
    color: #fff;
    padding: 1px 7px;
    border-radius: 3px;
    margin-left: 8px;
    letter-spacing: 0.05em;
    vertical-align: middle;
    text-decoration: none;
    border-bottom: none;
    cursor: help;
}

dd {
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 0;
}

dd ul {
    margin: 8px 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
}

dd ul li {
    font-size: 17px;
    margin-bottom: 4px;
}

dd a {
    color: var(--blue);
    font-size: 13px;
    word-break: break-all;
}

dd a:hover {
    color: var(--orange);
}

.exclusions-header {
    margin-top: 10px;
    font-size: 13px;
    font-style: italic;
    color: var(--text-muted);
    font-weight: 600;
}


#footer {
    margin-top: auto;
    background: #092940;
    color: #fff;
    font-size: 15px;
    text-align: center;
    padding: 10px 0;
}

#footer a {
    color: #fff
}


.back-to-top {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    right: 15px;
    bottom: 15px;
    z-index: 996;
    background: #092940;
    outline: 1px solid #fff;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    transition: all 0.4s;
}

.back-to-top i {
    font-size: 24px;
    color: #fff;
    line-height: 0;
}

.back-to-top:hover {
    background: #146091;
    color: #fff;
}

.back-to-top.active {
    visibility: visible;
    opacity: 1;
}


@media (max-width: 768px) {

    main.container {
        padding: 30px 20px 60px !important;
    }

    #site-header .navbar {
        padding: 0 20px;
    }

    .alpha-nav {
        padding: 0 20px;
    }

    #intro {
        padding: 36px 24px 30px;
    }

    #intro h1 {
        font-size: 1.6rem;
    }

    .percentile-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .entry-icon {
        display: none;
    }

    .entry-body {
        margin-left: 0;
    }
}

.pct-header {
    background: var(--lead-navy);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    padding: .75rem;
    border-radius: calc(.375rem - 1px) calc(.375rem - 1px) 0 0;
}

#backToTop {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lead-navy);
    color: #fff;
    border-radius: 50%;
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
    text-decoration: none;
    z-index: 1050;
}

#backToTop.active {
    opacity: 1;
    pointer-events: auto;
}