/* ==========================================================
   CDS Journey redesign — shared public header
   Approved implementation. Tokens: --rd-*
   Breakpoints: <1024 mobile; 1024–1199 compact desktop + mega; >=1200 desktop
   Desktop/tablet bar: logo slot | flexible middle (nav centered) | actions
   Sticky: position sticky on .rd-header (document flow). Do NOT wrap
   .rd-header in a short chrome-only parent — sticky is clipped to that
   ancestor and the bar will scroll away (homepage/FAQ/contact regression).
   On scroll (>=1200): bar/logo height shrink; fixed logo slot keeps nav X stable
   Dropdown shell (desktop): 760 × 380; quote: 210 × 340
   ========================================================== */

.rd-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--rd-color-white, #FFFFFF);
    border-bottom: 1px solid var(--rd-border-subtle, #DDE2E6);
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    color: var(--rd-color-navy, #1A2B4C);
    transition: box-shadow 0.2s ease;
}

.rd-header.is-scrolled {
    box-shadow: 0 2px 12px rgba(29, 29, 31, 0.06);
}

/* Mobile: simple flex — logo left, actions right */
.rd-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 64px; /* mobile <1024 */
    transition: height 0.2s ease;
}

/* Desktop/tablet: three stable regions
   [ logo slot ] [ flexible middle — nav centered ] [ actions ]
   Fixed logo slot keeps nav X stable when the logo image shrinks.
   Middle 1fr creates the visible Resources → Cart separation. */
@media (min-width: 1024px) {
    .rd-header__bar {
        display: grid;
        grid-template-columns: 200px minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 16px;
        height: 72px; /* compact desktop 1024–1199 */
    }
}

@media (min-width: 1200px) {
    .rd-header__bar {
        grid-template-columns: 280px minmax(0, 1fr) auto;
        column-gap: 24px;
        height: var(--rd-public-header-height, 80px); /* desktop */
    }

    .rd-header.is-scrolled .rd-header__bar,
    .rd-header.is-scrolled .rd-header__link {
        height: var(--rd-public-header-height-scrolled, 64px);
    }
}

/* ---- Logo region (stable slot; image may shrink inside) ---- */
.rd-header__brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

@media (min-width: 1024px) {
    .rd-header__brand {
        justify-self: start;
        width: 200px;
        min-width: 200px;
    }
}

@media (min-width: 1200px) {
    .rd-header__brand {
        width: 280px;
        min-width: 280px;
    }
}

.rd-header__logo {
    display: block;
    height: 40px;
    width: auto;
    max-width: min(58vw, 165px); /* mobile ~155–170 */
    object-fit: contain;
    object-position: left center;
    transition: height 0.2s ease, max-width 0.2s ease;
}

@media (min-width: 1024px) {
    .rd-header__logo {
        height: 48px;
        max-width: 200px; /* compact desktop */
    }
}

@media (min-width: 1200px) {
    .rd-header__logo {
        height: 68px;
        max-width: 280px;
    }

    .rd-header.is-scrolled .rd-header__logo {
        height: 52px;
        max-width: 220px;
    }
}

/* ---- Navigation region (centered in the middle track) ---- */
.rd-header__nav {
    display: none;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
}

@media (min-width: 1024px) {
    .rd-header__nav {
        display: flex;
        justify-content: center;
        justify-self: center;
        align-self: stretch;
        gap: 24px; /* tablet: 24–32 */
    }
}

@media (min-width: 1200px) {
    .rd-header__nav {
        gap: 36px; /* desktop: 32–40 */
    }
}

.rd-header__item {
    position: relative;
    flex-shrink: 0;
}

.rd-header__item--series {
    display: none;
}

@media (min-width: 1024px) {
    .rd-header__item--series {
        display: block;
    }
}

.rd-header__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 72px; /* compact desktop when nav is visible */
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: var(--rd-color-navy, #1A2B4C);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
    transition: color 0.18s ease;
}

@media (min-width: 1200px) {
    .rd-header__link {
        gap: 8px;
        height: var(--rd-public-header-height, 80px);
        font-size: 16px;
    }
}

.rd-header__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 14px;
    bottom: 16px;
    height: 3px;
    border-radius: 2px;
    background: var(--rd-color-olive, #4B5320);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.18s ease;
}

.rd-header.is-scrolled .rd-header__link::after {
    bottom: 12px;
}

.rd-header__link:hover,
.rd-header__link.is-active,
.rd-header__link[aria-expanded="true"] {
    color: var(--rd-color-olive, #4B5320);
}

.rd-header__link:hover::after,
.rd-header__link.is-active::after,
.rd-header__link[aria-expanded="true"]::after {
    transform: scaleX(1);
}

.rd-header__link:focus {
    outline: none;
}

.rd-header__link:focus-visible {
    outline: 2px solid var(--rd-color-navy, #1A2B4C);
    outline-offset: 3px;
}

/* Temporarily disabled nav label (Phase 20D.1 — Resources). Not a trigger. */
.rd-header__link--disabled,
span.rd-header__link.rd-header__link--disabled {
    color: var(--rd-disabled-text, var(--rd-text-muted, #ADB5BD));
    font-weight: 500;
    cursor: default;
    pointer-events: none;
    user-select: none;
}

.rd-header__link--disabled:hover,
.rd-header__link--disabled.is-active,
.rd-header__link--disabled[aria-expanded="true"] {
    color: var(--rd-disabled-text, var(--rd-text-muted, #ADB5BD));
}

.rd-header__link--disabled::after,
.rd-header__link--disabled:hover::after {
    display: none;
}

.rd-header__chevron {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    opacity: 0.75;
    transition: transform 0.15s ease;
}

.rd-header__link[aria-expanded="true"] .rd-header__chevron {
    transform: rotate(225deg) translateY(-1px);
}

.rd-header__acc-trigger .rd-header__chevron {
    transform: rotate(-45deg);
}

.rd-header__acc-trigger[aria-expanded="true"] .rd-header__chevron {
    transform: rotate(45deg) translateY(-1px);
}

/* ---- Dropdown shell: fixed 760 × 380 on desktop ----
   Horizontally centered under the header bar (same x for all menus).
   JS sets --rd-panel-shift so each panel (still positioned on its
   nav item) lands on that shared header center; caret stays on the
   active trigger. */
.rd-header__panel {
    position: absolute;
    top: calc(100% - 4px);
    left: 50%;
    right: auto;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 20px;
    box-sizing: border-box;
    width: min(92vw, 760px);
    height: auto;
    max-height: min(80vh, 380px);
    padding: 20px;
    background: var(--rd-color-white, #FFFFFF);
    border: 1px solid var(--rd-border-subtle, #DDE2E6);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(29, 29, 31, 0.14);
    overflow: hidden;
    transform: translateX(calc(-50% + var(--rd-panel-shift, 0px)));
}

@media (min-width: 1024px) {
    .rd-header__panel {
        width: 760px;
        height: 380px;
        max-height: 380px;
    }
}

.rd-header__panel::before {
    content: "";
    position: absolute;
    top: -6px;
    left: calc(50% - var(--rd-panel-shift, 0px));
    width: 12px;
    height: 12px;
    margin-left: -6px;
    background: var(--rd-color-white, #FFFFFF);
    border-left: 1px solid var(--rd-border-subtle, #DDE2E6);
    border-top: 1px solid var(--rd-border-subtle, #DDE2E6);
    transform: rotate(45deg);
}

.rd-header__mega-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .rd-header__mega-main {
        flex: 1 1 490px;
        width: 490px;
        max-width: 490px;
        justify-content: center; /* vertically balance left block vs quote */
    }
}

.rd-header__panel-label {
    position: relative;
    margin: 0 0 2px;
    padding-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rd-color-navy, #1A2B4C);
    line-height: 1.2;
}

.rd-header__panel-label::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 2px;
    border-radius: 1px;
    background: var(--rd-color-olive, #4B5320);
}

.rd-header__panel-sub {
    margin: 8px 0 14px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--rd-text-secondary, #6C757D);
}

.rd-header__mega {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    row-gap: 12px;
    flex: 0 0 auto;
    min-height: 0;
    align-content: start;
}

/* Menu rows — lightweight nav rows, NOT filled cards */
.rd-header__tile {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    min-height: 48px;
    height: auto;
    padding: 8px 6px;
    border-radius: 10px;
    background: transparent;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: background 150ms ease;
}

@media (min-width: 1024px) {
    .rd-header__tile {
        width: 100%;
        max-width: 235px;
        height: 70px;
        min-height: 70px;
        max-height: 70px;
        gap: 10px;
        padding: 10px 4px;
    }
}

.rd-header__tile:hover {
    background: var(--rd-surface-default, #F8F9FB);
    outline: none;
    box-shadow: none;
}

.rd-header__tile:focus {
    outline: none;
}

.rd-header__tile:focus-visible {
    outline: 2px solid var(--rd-color-navy, #1A2B4C);
    outline-offset: 2px;
    background: var(--rd-surface-default, #F8F9FB);
}

.rd-header__tile-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--rd-surface-default, #F8F9FB);
    color: var(--rd-color-olive, #4B5320);
    font-size: 18px;
}

.rd-header__tile-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rd-header__tile-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--rd-color-navy, #1A2B4C);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rd-header__tile-desc {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--rd-text-secondary, #6C757D);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rd-header__tile-go {
    flex-shrink: 0;
    align-self: center;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    color: var(--rd-color-olive, #4B5320);
    transition: transform 180ms ease;
}

.rd-header__tile:hover .rd-header__tile-go {
    transform: translateX(3px);
}

.rd-header__panel-foot {
    position: relative;
    display: inline-flex;
    align-self: flex-start; /* don’t stretch across left column */
    align-items: center;
    gap: 6px;
    margin-top: 16px; /* sit under grid — no large empty band */
    padding: 2px 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--rd-color-navy, #1A2B4C);
    text-decoration: none;
    white-space: nowrap;
    transition: color 180ms ease;
}

.rd-header__panel-foot:link,
.rd-header__panel-foot:visited {
    color: var(--rd-color-navy, #1A2B4C);
}

.rd-header__panel-foot::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36%;
    height: 2px;
    background: var(--rd-color-olive, #4B5320);
    transition: width 200ms ease;
}

.rd-header__panel-foot:hover {
    color: var(--rd-color-olive, #4B5320);
    outline: none;
}

.rd-header__panel-foot:hover::after {
    width: 100%;
}

.rd-header__panel-foot:hover > [aria-hidden="true"] {
    display: inline-block;
    transform: translateX(3px);
    transition: transform 180ms ease;
}

.rd-header__panel-foot:active {
    color: var(--rd-color-olive-hover, #3C4319);
}

.rd-header__panel-foot:active::after {
    width: 100%;
}

.rd-header__panel-foot:focus {
    outline: none;
}

.rd-header__panel-foot:focus-visible {
    outline: 2px solid var(--rd-color-navy, #1A2B4C);
    outline-offset: 3px;
}

.rd-header__panel-foot--secondary {
    display: none;
}

/* Quote image — fixed 210 × 340; ~20px from panel top/bottom */
.rd-header__quote {
    display: none;
    flex: 0 0 210px;
    width: 210px;
    height: 340px;
    align-self: center;
    border-radius: 12px;
    overflow: hidden;
    background: var(--rd-surface-default, #F8F9FB);
}

@media (min-width: 1024px) {
    .rd-header__quote {
        display: block;
    }
}

.rd-header__quote-img {
    display: block;
    width: 210px;
    height: 340px;
    object-fit: cover;
    object-position: center top;
}

/* ---- Action region (right-anchored, independent of nav) ---- */
.rd-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto; /* mobile flex: pin right */
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .rd-header__actions {
        justify-self: end;
        margin-left: 0;
        gap: 24px; /* Cart → Login/My Account */
        min-width: 0;
    }

    /* Login/My Account → primary CTA: slightly larger than cart gap */
    .rd-header__actions .rd-header__cta {
        margin-left: 8px; /* 24 + 8 = 32px from login */
    }
}

@media (min-width: 1200px) {
    .rd-header__actions {
        gap: 24px;
    }
}

.rd-header__divider {
    display: none;
    width: 1px;
    height: 28px;
    background: var(--rd-border-subtle, #DDE2E6);
}

@media (min-width: 1024px) {
    .rd-header__divider {
        display: block;
    }
}

.rd-header__cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    color: var(--rd-color-navy, #1A2B4C);
    text-decoration: none;
}

.rd-header__cart:hover {
    color: var(--rd-color-olive, #4B5320);
    outline: none;
}

.rd-header__cart:focus {
    outline: none;
}

.rd-header__cart:focus-visible {
    outline: 2px solid var(--rd-color-navy, #1A2B4C);
    outline-offset: 3px;
}

.rd-header__cart:visited {
    color: var(--rd-color-navy, #1A2B4C);
}

.rd-header__cart-icon {
    display: inline-flex;
}

.rd-header__cart-badge {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--rd-color-gold, #D4AF37);
    color: var(--rd-color-black, #1D1D1F);
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.rd-header__cart-badge[hidden] {
    display: none !important;
}

/* Dashboard — authenticated utility nav (not gold CTA) */
.rd-header__dashboard {
    display: none;
    align-items: center;
    padding: 8px 4px 10px;
    color: var(--rd-color-navy, #1A2B4C);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.rd-header__dashboard:link,
.rd-header__dashboard:visited {
    color: var(--rd-color-navy, #1A2B4C);
}

.rd-header__dashboard:hover,
.rd-header__dashboard:focus-visible {
    color: var(--rd-color-olive, #4B5320);
    outline: none;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

@media (min-width: 1024px) {
    .rd-header__dashboard {
        display: inline-flex;
    }
}

/* Authenticated account control + compact dropdown */
.rd-header__account {
    position: relative;
    display: block;
}

.rd-header__account-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 11.5rem;
    min-height: 40px;
    padding: 3px 8px 3px 3px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--rd-color-navy, #1A2B4C);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease;
}

.rd-header__account-btn:hover,
.rd-header__account.is-open .rd-header__account-btn,
.rd-header__account:focus-within .rd-header__account-btn {
    border-color: var(--rd-border-subtle, #DDE2E6);
    background: var(--rd-color-light, #F8F9FB);
}

.rd-header__account-btn:focus {
    outline: none;
}

.rd-header__account-btn:focus-visible {
    outline: 2px solid var(--rd-color-navy, #1A2B4C);
    outline-offset: 2px;
}

.rd-header__account-avatar,
.rd-header__account-identity-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--rd-color-navy, #1A2B4C);
    color: #fff;
    flex-shrink: 0;
}

.rd-header__account-avatar img,
.rd-header__account-identity-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rd-header__account-initial {
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.rd-header__account-name {
    display: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rd-header__account-chevron {
    display: inline-block;
    flex-shrink: 0;
    transition: transform 150ms ease;
}

.rd-header__account.is-open .rd-header__account-chevron,
.rd-header__account:focus-within .rd-header__account-chevron {
    transform: rotate(180deg);
}

@media (min-width: 1024px) {
    .rd-header__account-name {
        display: inline;
    }

    .rd-header__account:hover .rd-header__account-chevron {
        transform: rotate(180deg);
    }
}

.rd-header__account-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 80;
    box-sizing: border-box;
    width: min(300px, calc(100vw - 1.5rem));
    padding: 8px 0;
    border: 1px solid var(--rd-border-subtle, #DDE2E6);
    border-radius: 12px;
    background: var(--rd-color-white, #FFFFFF);
    box-shadow: 0 8px 20px rgba(26, 43, 76, 0.08);
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

/* Hover bridge — prevents gap flicker when moving into the menu */
.rd-header__account-menu::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.rd-header__account.is-open .rd-header__account-menu,
.rd-header__account:focus-within .rd-header__account-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
    .rd-header__account:hover .rd-header__account-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
}

.rd-header__account-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 14px;
}

.rd-header__account-identity-avatar {
    width: 32px;
    height: 32px;
}

.rd-header__account-identity-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rd-header__account-identity-name {
    margin: 0;
    color: var(--rd-color-navy, #1A2B4C);
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rd-header__account-identity-role {
    margin: 0;
    color: var(--rd-color-muted, #6C757D);
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.25;
}

.rd-header__account-sep {
    height: 1px;
    margin: 4px 0;
    background: var(--rd-border-subtle, #DDE2E6);
}

.rd-header__account-section {
    margin: 8px 14px 2px;
    color: var(--rd-color-muted, #6C757D);
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.rd-header__account-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    color: var(--rd-color-navy, #1A2B4C);
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    transition: background 120ms ease, color 120ms ease;
}

.rd-header__account-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--rd-color-muted, #6C757D);
    flex-shrink: 0;
}

.rd-header__account-item-icon svg {
    width: 18px;
    height: 18px;
}

.rd-header__account-item-label {
    flex: 1;
    min-width: 0;
}

.rd-header__account-item-go {
    color: #C5CDD4;
    font-size: 0.8125rem;
    font-weight: 400;
    flex-shrink: 0;
}

.rd-header__account-item:hover,
.rd-header__account-item:focus-visible {
    background: var(--rd-color-light, #F8F9FB);
    color: var(--rd-color-navy, #1A2B4C);
    outline: none;
}

.rd-header__account-item:hover .rd-header__account-item-icon,
.rd-header__account-item:focus-visible .rd-header__account-item-icon {
    color: var(--rd-color-olive, #4B5320);
}

.rd-header__account-item:hover .rd-header__account-item-go,
.rd-header__account-item:focus-visible .rd-header__account-item-go {
    color: var(--rd-color-olive, #4B5320);
}

.rd-header__account-item--logout {
    color: var(--rd-color-navy, #1A2B4C);
    font-weight: 500;
}

.rd-header__account-item--logout .rd-header__account-item-icon {
    color: var(--rd-color-muted, #6C757D);
}

.rd-header__account-item--logout:hover,
.rd-header__account-item--logout:focus-visible {
    color: var(--rd-color-navy, #1A2B4C);
    background: var(--rd-color-light, #F8F9FB);
}

/* Login — utility nav, NOT a primary CTA. No hover box/outline. */
.rd-header__login {
    position: relative;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 4px 10px;
    border: none;
    background: transparent;
    color: var(--rd-color-navy, #1A2B4C);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color 180ms ease;
}

.rd-header__login:link,
.rd-header__login:visited {
    color: var(--rd-color-navy, #1A2B4C);
}

.rd-header__login::after {
    content: "";
    position: absolute;
    left: 4px;
    right: auto;
    bottom: 4px;
    width: 36%;
    height: 2px;
    background: var(--rd-color-olive, #4B5320);
    transition: width 200ms ease;
}

.rd-header__login:hover {
    color: var(--rd-color-olive, #4B5320);
    outline: none;
    border: none;
    background: transparent;
    box-shadow: none;
}

.rd-header__login:hover::after {
    width: calc(100% - 8px);
}

.rd-header__login:active {
    color: #142038;
}

.rd-header__login:focus {
    outline: none;
}

.rd-header__login:focus-visible {
    outline: 2px solid var(--rd-color-navy, #1A2B4C);
    outline-offset: 3px;
}

@media (min-width: 1024px) {
    .rd-header__login {
        display: inline-flex;
    }
}

/* Start Preparing — primary gold CTA. Hover ≠ focus outline. */
.rd-header__cta {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 20px;
    border: none;
    border-radius: 8px;
    background: var(--rd-action-primary-bg, #D4AF37);
    color: var(--rd-action-primary-text, #1D1D1F);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none;
    transition:
        background 180ms ease,
        color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.rd-header__cta:link,
.rd-header__cta:visited {
    color: var(--rd-action-primary-text, #1D1D1F);
    background: var(--rd-action-primary-bg, #D4AF37);
}

.rd-header__cta:hover {
    background: var(--rd-action-primary-hover-bg, #C49F28);
    color: var(--rd-action-primary-text, #1D1D1F);
    border: none;
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 29, 31, 0.1);
}

.rd-header__cta:hover > [aria-hidden="true"] {
    display: inline-block;
    transform: translateX(3px);
    transition: transform 180ms ease;
}

.rd-header__cta:active {
    background: var(--rd-action-primary-active-bg, #B08D1F);
    color: var(--rd-action-primary-text, #1D1D1F);
    transform: translateY(0);
    box-shadow: none;
}

.rd-header__cta:focus {
    outline: none;
}

.rd-header__cta:focus-visible {
    outline: 2px solid var(--rd-color-navy, #1A2B4C);
    outline-offset: 3px;
}

@media (min-width: 1024px) {
    .rd-header__cta {
        display: inline-flex;
    }
}

.rd-header__menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--rd-color-navy, #1A2B4C);
}

.rd-header__menu-btn:focus-visible {
    outline: 2px solid var(--rd-color-navy, #1A2B4C);
    outline-offset: 2px;
}

@media (min-width: 1024px) {
    .rd-header__menu-btn,
    .rd-header__overlay,
    .rd-header__drawer {
        display: none !important;
    }
}

.rd-header__menu-icon,
.rd-header__menu-icon::before,
.rd-header__menu-icon::after {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

.rd-header__menu-icon {
    position: relative;
}

.rd-header__menu-icon::before,
.rd-header__menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.rd-header__menu-icon::before { top: -6px; }
.rd-header__menu-icon::after { top: 6px; }

/* ---- Mobile / tablet drawer ---- */
.rd-header__overlay {
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: rgba(29, 29, 31, 0.28);
}

.rd-header__overlay[hidden] {
    display: none !important;
}

.rd-header__drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
    height: 100%;
    height: 100dvh;
    overflow-y: auto;
    background: var(--rd-color-white, #FFFFFF);
    box-shadow: -8px 0 24px rgba(29, 29, 31, 0.12);
}

.rd-header__drawer[hidden] {
    display: none !important;
}

.rd-header__drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    height: 64px;
    padding: 0 20px;
    border-bottom: 1px solid var(--rd-border-subtle, #DDE2E6);
}

.rd-header__drawer-head .rd-header__logo {
    height: 40px;
    max-width: 160px;
}

.rd-header__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: var(--rd-color-navy, #1A2B4C);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.rd-header__close:focus-visible {
    outline: 2px solid var(--rd-color-navy, #1A2B4C);
    outline-offset: 2px;
}

.rd-header__accordion {
    flex: 1 1 auto;
    padding: 0;
}

.rd-header__acc-item {
    border-bottom: 1px solid var(--rd-border-subtle, #DDE2E6);
}

.rd-header__acc-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
    padding: 16px 20px;
    border: 0;
    background: transparent;
    color: var(--rd-color-navy, #1A2B4C);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.rd-header__acc-trigger[aria-expanded="true"] {
    color: var(--rd-color-navy, #1A2B4C);
    background: transparent;
}

.rd-header__acc-trigger[aria-expanded="true"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: var(--rd-color-olive, #4B5320);
}

.rd-header__acc-trigger[aria-expanded="true"] .rd-header__chevron {
    color: var(--rd-color-olive, #4B5320);
}

.rd-header__acc-trigger:focus-visible {
    outline: 2px solid var(--rd-color-navy, #1A2B4C);
    outline-offset: -2px;
}

/* Temporarily disabled drawer row (Phase 20D.1 — Resources). */
.rd-header__acc-trigger--disabled,
span.rd-header__acc-trigger.rd-header__acc-trigger--disabled {
    color: var(--rd-disabled-text, var(--rd-text-muted, #ADB5BD));
    font-weight: 500;
    cursor: default;
    pointer-events: none;
    user-select: none;
}

.rd-header__acc-trigger-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.rd-header__acc-trigger .rd-header__chevron {
    width: 8px;
    height: 8px;
    opacity: 0.85;
}

.rd-header__acc-panel {
    padding: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rd-header__acc-panel .rd-header__tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    height: auto;
    min-height: 44px;
    max-height: none;
    max-width: none;
    padding: 12px 20px 12px 36px;
    border-radius: 0;
    background: transparent;
}

.rd-header__acc-panel .rd-header__tile:hover {
    background: var(--rd-surface-default, #F8F9FB);
}

.rd-header__acc-panel .rd-header__tile-icon,
.rd-header__acc-panel .rd-header__tile-go {
    display: none;
}

.rd-header__acc-panel .rd-header__tile-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
}

.rd-header__acc-panel .rd-header__tile-title {
    font-size: 15px;
    font-weight: 600;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

.rd-header__acc-panel .rd-header__tile-desc {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: var(--rd-text-secondary, #6C757D);
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

.rd-header__acc-panel .rd-header__panel-foot {
    margin: 8px 20px 4px 36px;
    align-self: flex-start;
}

.rd-header__drawer-foot {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    margin-top: auto;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--rd-border-subtle, #DDE2E6);
}

.rd-header__drawer-user {
    margin: 0 0 8px;
    color: var(--rd-color-navy, #1A2B4C);
    font-size: 0.9375rem;
    font-weight: 700;
}

.rd-header__drawer-link,
.rd-header__dashboard--drawer {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 0;
    color: var(--rd-color-navy, #1A2B4C);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
}

.rd-header__drawer-link:hover,
.rd-header__dashboard--drawer:hover {
    color: var(--rd-color-olive, #4B5320);
}

.rd-header__drawer-link--logout {
    margin-top: 4px;
    border-top: 1px solid var(--rd-border-subtle, #DDE2E6);
    color: #5C4A3A;
}

.rd-header__drawer-foot .rd-header__login,
.rd-header__drawer-foot .rd-header__cta {
    display: flex;
    width: 100%;
}

.rd-header__drawer-foot .rd-header__login {
    justify-content: flex-start;
    min-height: 44px;
    padding: 10px 0 12px;
    border: none;
    border-radius: 0;
    background: transparent;
}

.rd-header__drawer-foot .rd-header__login::after {
    left: 0;
    bottom: 6px;
    width: 36%;
}

.rd-header__drawer-foot .rd-header__login:hover {
    color: var(--rd-color-olive, #4B5320);
    background: transparent;
    outline: none;
}

.rd-header__drawer-foot .rd-header__login:hover::after {
    width: 100%;
}

.rd-header__drawer-foot .rd-header__cta {
    height: 48px;
    justify-content: center;
}

body.rd-header-nav-open {
    overflow: hidden;
}

/* Mega menus apply from 1024px. Below that, only the mobile drawer. */
@media (max-width: 1023px) {
    .rd-header__quote {
        display: none !important;
    }

    .rd-header__panel {
        display: none !important; /* mobile uses drawer accordion only */
    }

    .rd-header__actions {
        gap: 2px;
    }
}
