.td-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--td-paper);
}

.td-rule {
    height: 4px;
    background: #000;
}

.td-site-header-shell,
.td-site-footer-shell {
    background: #fff;
}

.td-site-header-shell {
    border-bottom: 1px solid var(--td-line);
}

.td-site-footer-shell {
    border-top: 1px solid var(--td-line);
}

.td-site-header {
    padding-top: 16px;
    padding-bottom: 16px;
}

.td-site-footer {
    padding-top: 20px;
    padding-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.875rem;
    color: var(--td-muted);
}

.td-footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.td-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    color: var(--td-ink);
    text-decoration: none;
    text-align: center;
}

    .td-brand:hover {
        text-decoration: none;
    }

.td-brand__logo {
    width: 56px;
    height: 56px;
    border: 1px solid #000;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    flex: 0 0 auto;
}

    .td-brand__logo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.td-brand__content {
    display: block;
    min-width: 0;
    white-space: nowrap;
}

.td-brand__title {
    display: block;
    font-size: 2rem;
    line-height: 1;
    font-weight: 700;
}

.td-brand__subtitle {
    display: block;
    margin-top: 5px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    color: var(--td-muted);
}

.td-inline-form {
    margin: 0;
    display: inline;
}

.td-link-button {
    background: none;
    border: 0;
    color: var(--td-ink);
    cursor: pointer;
}

    .td-link-button:hover {
        text-decoration: underline;
    }

.td-country-picker {
    width: 100%;
    max-width: 360px;
    text-align: center;
}

.td-country-picker__form {
    margin: 0;
}

.td-country-picker__select {
    width: 100%;
    min-height: 42px;
    border-radius: 0;
    text-align: left;
}

.td-header-grid {
    display: block;
}

.td-header-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
}

.td-brand--navbar {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    text-decoration: none;
    min-width: 0;
    flex: 1 1 auto;
    width: auto;
    justify-content: flex-start;
    text-align: left;
}

.td-menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 46px;
    height: 42px;
    border: 1px solid rgba(17, 17, 17, 0.18);
    border-radius: 8px;
    background: #fff;
    padding: 0;
    flex: 0 0 46px;
}

    .td-menu-toggle:focus {
        outline: none;
        box-shadow: none;
    }

.td-menu-toggle__bar {
    display: block;
    width: 20px;
    height: 2px;
    background: #111;
}

.td-nav-collapse {
    width: 100%;
    margin-top: 12px;
    border-top: 1px solid #e7e1d7;
}

.td-nav-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
    padding-top: 4px;
}

.td-nav-menu__link {
    display: block;
    color: #111111;
    font-weight: 600;
    text-decoration: none;
    padding: 14px 0;
    border-bottom: 1px solid #f0ebe3;
    line-height: 1.2;
}

    .td-nav-menu__link:hover,
    .td-nav-menu__link:focus {
        color: #111111;
        text-decoration: none;
    }

.td-nav-menu__form {
    margin: 0;
    display: block;
    width: 100%;
}

.td-nav-menu__button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    color: #111111;
    font-weight: 600;
    padding: 14px 0;
    border-bottom: 1px solid #f0ebe3;
    line-height: 1.2;
    cursor: pointer;
}

    .td-nav-menu__button:hover,
    .td-nav-menu__button:focus {
        color: #111111;
        text-decoration: none;
    }

.td-nav-menu__link--cta {
    border: 1px solid #000;
    padding: 10px 14px !important;
    margin-top: 10px;
    font-size: 0.76rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    font-weight: 700;
    background: #000;
    color: #fff !important;
    text-decoration: none;
    text-align: center;
    border-radius: 0;
}

.td-country-picker--header {
    width: 100%;
    max-width: 360px;
    margin: 10px auto 6px;
    text-align: center;
}

.td-country-picker--header .td-country-picker__select {
    min-height: 38px;
    padding-top: 7px;
    padding-bottom: 7px;
    line-height: 1.2;
}

.td-main--account {
    padding-top: 20px;
    padding-bottom: 48px;
}

@media (max-width: 760px) {
    .td-site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .td-brand {
        flex-direction: column;
        gap: 10px;
    }

    .td-brand--navbar {
        flex-direction: row;
        gap: 0.65rem;
        text-align: left;
        min-width: 0;
    }

    .td-brand__logo {
        width: 44px;
        height: 44px;
    }

    .td-brand__title {
        font-size: 1.35rem;
        line-height: 1.05;
    }

    .td-brand__subtitle {
        line-height: 1.15;
        font-size: 0.47rem;
        letter-spacing: 0.03em;
        margin-top: 3px;
    }

    .td-menu-toggle {
        width: 42px;
        height: 40px;
        flex: 0 0 42px;
    }

    .td-menu-toggle__bar {
        width: 18px;
    }
}

@media (max-width: 420px) {
    .td-header-brand-row {
        gap: 10px;
    }

    .td-brand--navbar {
        gap: 0.55rem;
    }

    .td-brand__logo {
        width: 40px;
        height: 40px;
    }

    .td-brand__title {
        font-size: 1.15rem;
    }

    .td-brand__subtitle {
        font-size: 0.43rem;
        letter-spacing: 0.02em;
    }

    .td-menu-toggle {
        width: 40px;
        height: 38px;
        flex: 0 0 40px;
    }

    .td-menu-toggle__bar {
        width: 17px;
    }

    .td-country-picker--header {
        margin-top: 12px;
        margin-bottom: 8px;
        max-width: 100%;
    }

    .td-country-picker--header .td-country-picker__select {
        min-height: 38px;
    }
}

@media (min-width: 992px) {
    .td-site-header {
        padding-top: 18px;
        padding-bottom: 32px;
    }

    .td-header-grid {
        display: grid;
        grid-template-columns: minmax(320px, auto) 1fr;
        grid-template-areas:
            "brand nav"
            ". country";
        column-gap: 28px;
        row-gap: 0;
        align-items: start;
    }

    .td-header-brand-row {
        grid-area: brand;
        display: block;
    }

    .td-brand--navbar {
        align-self: start;
        width: auto;
    }

    .td-menu-toggle {
        display: none;
    }

    .td-nav-collapse {
        grid-area: nav;
        display: block !important;
        width: auto;
        margin-top: 0;
        border-top: 0;
        justify-self: end;
        align-self: start;
        padding-top: 0;
    }

    .td-nav-menu {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 0;
        padding-top: 0;
        width: auto;
        min-height: 36px;
    }

    .td-nav-menu__link,
    .td-nav-menu__button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 36px;
        padding: 0 0.8rem;
        border-bottom: 0;
        white-space: nowrap;
        line-height: 1;
        vertical-align: middle;
    }

    .td-nav-menu__form {
        display: inline-flex;
        align-items: center;
        width: auto;
        margin: 0;
    }

    .td-nav-menu__link--cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 36px;
        padding: 0.5rem 1rem !important;
        margin-top: 0;
        margin-left: 4px;
        border-radius: 0;
    }

    .td-country-picker--header {
        grid-area: country;
        width: auto;
        max-width: 100%;
        margin: 12px 0 12px auto;
        padding-bottom: 0;
        text-align: right;
    }

    .td-country-picker__form {
        display: inline-block;
    }

    .td-country-picker__select {
        width: auto;
        min-width: 220px;
        max-width: 100%;
        min-height: 38px;
        display: inline-block;
    }

    .td-menu-toggle {
        color: #111;
    }

        .td-menu-toggle::before {
            content: "☰";
            font-size: 20px;
            line-height: 1;
        }

    .td-menu-toggle__bar {
        display: none;
    }
}

/* TD User Avatar - refined circular account icon */

.td-nav-menu .td-nav-menu__avatar-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 54px !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #f0ebe3 !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 auto !important;
}

.td-nav-menu .td-user-avatar {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 50% !important;
    background-color: #111 !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 1.12rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.03em !important;
    line-height: 1 !important;
    border: 2px solid #fff !important;
    box-shadow: 0 0 0 1px #111, 0 3px 8px rgba(0, 0, 0, 0.24) !important;
    text-transform: uppercase !important;
    text-align: center !important;
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
}

.td-nav-menu .td-nav-menu__avatar-wrap:hover .td-user-avatar,
.td-nav-menu .td-nav-menu__avatar-wrap:focus .td-user-avatar {
    background-color: #2a2a2a !important;
    box-shadow: 0 0 0 1px #111, 0 4px 10px rgba(0, 0, 0, 0.30) !important;
}

/* Desktop placement: Home | About | Contact | My Area | Logout | [BO] */
@media (min-width: 992px) {
    .td-nav-menu .td-nav-menu__avatar-wrap {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 36px !important;
        padding: 0 0 0 0.85rem !important;
        border-bottom: 0 !important;
        white-space: nowrap !important;
        flex: 0 0 auto !important;
    }

    .td-nav-menu .td-user-avatar {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        font-size: 1.02rem !important;
    }

}

/* TD v6.5.30AG - Admin dropdown navigation (Option A desktop / Option C mobile) */
.td-nav-menu__dropdown {
    position: relative;
    width: 100%;
}

.td-nav-menu__dropdown-toggle {
    width: 100%;
    background: none;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    border-radius: 0;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.td-nav-menu__dropdown-caret {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.75rem;
    line-height: 1;
    transition: transform 0.15s ease;
}

.td-nav-menu__dropdown-menu {
    display: none;
    margin: 0.15rem 0 0.6rem 0.75rem;
    padding: 0.2rem 0 0.2rem 0.85rem;
    border-left: 2px solid #111;
    background: #fff;
}

.td-nav-menu__dropdown.is-open > .td-nav-menu__dropdown-menu {
    display: block;
}

.td-nav-menu__dropdown.is-open > .td-nav-menu__dropdown-toggle .td-nav-menu__dropdown-caret {
    transform: rotate(180deg);
}

.td-nav-menu__dropdown-item {
    display: block;
    color: #111111;
    font-weight: 600;
    text-decoration: none;
    padding: 11px 0;
    border-bottom: 1px solid #f0ebe3;
    line-height: 1.2;
    white-space: nowrap;
}

.td-nav-menu__dropdown-item:last-child {
    border-bottom: 0;
}

.td-nav-menu__dropdown-item:hover,
.td-nav-menu__dropdown-item:focus {
    color: #111111;
    text-decoration: none;
}

@media (min-width: 992px) {
    .td-nav-menu__dropdown {
        width: auto;
        display: inline-flex;
        align-items: center;
    }

    .td-nav-menu__dropdown-toggle {
        width: auto;
        text-align: center;
    }

    .td-nav-menu__dropdown-menu {
        position: absolute;
        top: 100%;
        right: 0;
        z-index: 1040;
        min-width: 230px;
        margin: 0;
        padding: 0.35rem 0;
        border: 1px solid #111;
        background: #fff;
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
    }

    .td-nav-menu__dropdown:hover > .td-nav-menu__dropdown-menu,
    .td-nav-menu__dropdown:focus-within > .td-nav-menu__dropdown-menu,
    .td-nav-menu__dropdown.is-open > .td-nav-menu__dropdown-menu {
        display: block;
    }

    .td-nav-menu__dropdown:hover > .td-nav-menu__dropdown-toggle .td-nav-menu__dropdown-caret,
    .td-nav-menu__dropdown:focus-within > .td-nav-menu__dropdown-toggle .td-nav-menu__dropdown-caret,
    .td-nav-menu__dropdown.is-open > .td-nav-menu__dropdown-toggle .td-nav-menu__dropdown-caret {
        transform: rotate(180deg);
    }

    .td-nav-menu__dropdown-item {
        padding: 0.78rem 1rem;
        border-bottom: 1px solid #f0ebe3;
        background: #fff;
    }

    .td-nav-menu__dropdown-item:hover,
    .td-nav-menu__dropdown-item:focus {
        background: #f8f3ea;
    }
}

/* v6.5.46 Admin mobile cleanup: mobile Hamburger is the single navigation path for Admin pages. */
@media (max-width: 1100px) {
    .td-ah-shell .td-ah-mobile-nav,
    .td-dc-shell .td-dc-mobile-nav {
        display: none !important;
    }
}

/* TD v6.5.67HE - Mobile Sticky Header Runtime Patch / CSS-only first pass.
   Mobile only: keep the main header stable while scrolling without changing desktop layout. */
@media (max-width: 991.98px) {
    .td-site-header-shell {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 1030;
        background: #fff;
    }

    .td-site-header {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .td-header-brand-row {
        align-items: center;
        min-width: 0;
    }

    .td-brand--navbar {
        min-width: 0;
        overflow: hidden;
    }

    .td-brand__content {
        min-width: 0;
        overflow: hidden;
    }

    .td-brand__title,
    .td-brand__subtitle {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .td-nav-collapse {
        margin-top: 10px;
        background: #fff;
    }

    .td-nav-collapse.show,
    .td-nav-collapse.collapsing {
        max-height: calc(100vh - 78px);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .td-nav-menu {
        padding-bottom: 12px;
    }
}

/* TD v6.5.67HFA - Mobile Header Border Restoration Hotfix.
   Corrective follow-up to v6.5.67HF: keep the sticky header bottom line visible,
   but remove the duplicate top border from the opened mobile hamburger panel. */
@media (max-width: 991.98px) {
    .td-site-header-shell {
        border-bottom: 1px solid var(--td-line);
    }

    .td-nav-collapse,
    .td-nav-collapse.show,
    .td-nav-collapse.collapsing {
        border-top: 0 !important;
    }
}

/* TD v6.5.67HFB - Mobile first-section separator cleanup.
   Keep the sticky header bottom border visible and remove only the first
   mobile submenu title separator above Launch, which visually duplicated the
   header border when the hamburger opens. */
@media (max-width: 991.98px) {
    .td-site-header-shell {
        border-bottom: 1px solid var(--td-line);
    }

    .td-nav-collapse,
    .td-nav-collapse.show,
    .td-nav-collapse.collapsing {
        border-top: 0 !important;
    }

    .td-mobile-admin-submenu > .td-mobile-admin-submenu__title:first-child {
        border-top: 0 !important;
        margin-top: 0 !important;
        padding-top: 0.35rem;
    }
}

/* TD v6.5.67HFC - Mobile active hamburger header border restoration.
   Keep the visible divider attached to the header itself when the hamburger is open.
   The outer sticky shell contains the expanded menu, so its border can move to the
   bottom of the menu; on mobile the border belongs on .td-site-header instead. */
@media (max-width: 991.98px) {
    .td-site-header-shell {
        border-bottom: 0 !important;
    }

    .td-site-header {
        border-bottom: 1px solid var(--td-line) !important;
    }

    .td-nav-collapse,
    .td-nav-collapse.show,
    .td-nav-collapse.collapsing {
        border-top: 0 !important;
    }

    .td-nav-collapse .td-mobile-admin-submenu > .td-mobile-admin-submenu__title:first-child,
    .td-nav-collapse.show .td-mobile-admin-submenu > .td-mobile-admin-submenu__title:first-child,
    .td-nav-collapse.collapsing .td-mobile-admin-submenu > .td-mobile-admin-submenu__title:first-child {
        border-top: 0 !important;
        margin-top: 0 !important;
        padding-top: 0.35rem !important;
    }
}

/* TD v6.5.67HFD - Mobile active hamburger soft fixed divider refinement.
   Keep the header divider fixed while the hamburger list scrolls, remove the
   first Launch separator, and use a subtle non-scrolling inset divider on the
   open hamburger scroll frame instead of a hard duplicate top border. */
@media (max-width: 991.98px) {
    .td-site-header-shell {
        border-bottom: 0 !important;
    }

    .td-site-header {
        border-bottom: 1px solid var(--td-line) !important;
        position: relative;
        z-index: 2;
    }

    .td-nav-collapse,
    .td-nav-collapse.show,
    .td-nav-collapse.collapsing {
        border-top: 0 !important;
    }

    .td-nav-collapse.show {
        box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.045);
    }

    .td-nav-collapse.collapsing {
        box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.035);
    }

    .td-nav-collapse .td-mobile-admin-submenu > .td-mobile-admin-submenu__title:first-child,
    .td-nav-collapse.show .td-mobile-admin-submenu > .td-mobile-admin-submenu__title:first-child,
    .td-nav-collapse.collapsing .td-mobile-admin-submenu > .td-mobile-admin-submenu__title:first-child {
        border-top: 0 !important;
        margin-top: 0 !important;
        padding-top: 0.35rem !important;
    }
}

