/* Language toggle pill — sits in the header next to the Menu link. */

.lang-toggle {
    display: inline-block;
    padding: 0.35em 0.85em;
    margin-right: 1em;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35) !important;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.lang-toggle:hover {
    border-color: rgba(255, 255, 255, 0.85);
    color: #ffffff !important;
}

.lang-toggle .lang-sep {
    margin: 0 0.45em;
    opacity: 0.45;
}

/* Active side is full-bright; inactive side dims. */
.lang-toggle[data-active="en"] .lang-en,
.lang-toggle[data-active="zh"] .lang-zh {
    color: #ffffff;
    opacity: 1;
}

.lang-toggle[data-active="en"] .lang-zh,
.lang-toggle[data-active="zh"] .lang-en {
    opacity: 0.5;
}

/* When the header has the .alt class (banner pages), the background is
   dark, so the white-on-dark colors above already work. The default
   (non-alt) header uses a light background; override for that case. */
#header:not(.alt) .lang-toggle {
    border-color: rgba(0, 0, 0, 0.25);
    color: rgba(0, 0, 0, 0.7);
    border-bottom-color: rgba(0, 0, 0, 0.25) !important;
}

#header:not(.alt) .lang-toggle:hover {
    border-color: rgba(0, 0, 0, 0.6);
    color: #000000 !important;
}

#header:not(.alt) .lang-toggle[data-active="en"] .lang-en,
#header:not(.alt) .lang-toggle[data-active="zh"] .lang-zh {
    color: #000000;
}

/* Contact section: the spec uses display-only contact (no form), so the
   .split block is the only child of #contact > .inner. Forty's default
   nth-child rules give the first child width: 60% with a right border —
   meant for the form/contact-info side-by-side layout. Override so the
   contact-method blocks span full width without a stub border. */
#contact > .inner > .split {
    width: 100%;
    border-right: none;
}
