/* Masthead and navigation */
.nexta-site .brand-header {
    color: var(--nexta-on-brand);
    background: var(--nexta-brand-surface);
}

.nexta-site .brand-header .mast {
    display: flex;
    min-height: 64px;
    align-items: center;
    gap: 28px;
    padding-block: 6px;
}

.nexta-site .brand-home {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
}

.nexta-site .brand-header .logo {
    display: block;
    width: 118px;
    height: 26px;
    object-fit: contain;
    object-position: left center;
}

.nexta-site .brand-header .tools {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.nexta-site .language-switcher {
    display: inline-flex;
    align-items: center;
    color: var(--nexta-on-brand);
    font-size: 12px;
    font-weight: 600;
}

.nexta-site .language-switcher ul {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nexta-site .language-switcher a,
.nexta-site .language-current {
    display: inline-flex;
    min-width: 32px;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--nexta-on-brand);
    background: transparent;
    font-size: 12px;
    font-weight: 650;
}

.nexta-site .language-switcher a:hover,
.nexta-site .language-switcher a[aria-current="page"] {
    border-color: #ffffff50;
    background: #ffffff14;
}

.nexta-site .language-switcher--dialog {
    color: var(--ink);
}

.nexta-site .language-switcher--dialog a,
.nexta-site .language-switcher--dialog .language-current {
    color: var(--nexta-text);
    border-color: var(--nexta-control-border);
    background: var(--nexta-control-bg);
}

.nexta-site .language-switcher--dialog a[aria-current="page"] {
    color: #fff;
    border-color: var(--nexta-link);
    background: var(--brand);
}

.nexta-site .brand-header .icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #ffffff50;
    border-radius: 50%;
    color: var(--nexta-on-brand);
    background: transparent;
}

.nexta-site .brand-header .icon:hover {
    background: #ffffff17;
}

.nexta-site .brand-header .icon svg {
    display: block;
    width: 22px;
    height: 22px;
}

.nexta-site .brand-header .support {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 7px;
    color: var(--nexta-link);
    background: var(--nexta-surface);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.nexta-site .brand-header .support:hover {
    color: var(--nexta-link);
    background: var(--nexta-brand-control-hover);
}

.nexta-site .brand-header .menu-button {
    display: none;
}

.nexta-site .desktop-nav.wrap {
    width: 100%;
    max-width: none;
    min-height: 48px;
    margin: 0;
    padding-inline: max(32px, calc((100% - 1280px) / 2));
    border-bottom: 1px solid var(--line);
    color: var(--nexta-text);
    background: var(--nexta-surface);
}

.nexta-site .desktop-nav-inner {
    display: flex;
    max-width: 1280px;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-inline: auto;
}

.nexta-site .topics {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.nexta-site .topics-list {
    display: flex;
    min-width: 0;
    align-items: stretch;
    gap: 26px;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
}

.nexta-site .topics-list::-webkit-scrollbar {
    display: none;
}

.nexta-site .topics-list a {
    display: flex;
    min-height: 48px;
    flex: 0 0 auto;
    align-items: center;
    color: var(--ink);
    font-size: 13px;
    font-weight: 550;
}

.nexta-site .topics-list a:hover,
.nexta-site .topics-list a[aria-current="page"] {
    color: var(--nexta-link);
}

/* Desktop navigation: horizontal WordPress menu */
.nexta-site .topics > .menu-links,
.nexta-site .topics > .topics-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 26px;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    list-style: none;
    white-space: nowrap;
}

.nexta-site .topics > .menu-links::-webkit-scrollbar,
.nexta-site .topics > .topics-list::-webkit-scrollbar {
    display: none;
}

.nexta-site .topics > .menu-links > li,
.nexta-site .topics > .topics-list > li {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
}

.nexta-site .topics > .menu-links > li > a,
.nexta-site .topics > .topics-list > li > a {
    display: flex;
    min-height: 48px;
    align-items: center;
    padding: 0;
    white-space: nowrap;
}

.nexta-site .institution {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 24px;
}

.nexta-site .institution-list {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nexta-site .institution-list a,
.nexta-site .institution .text-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    color: var(--ink);
    font-size: 12px;
    font-weight: 550;
    white-space: nowrap;
}

.nexta-site .institution-list a:hover,
.nexta-site .institution .text-button:hover {
    color: var(--nexta-link);
}

/* Native menu and search dialogs */
.nexta-site .nexta-dialog {
    width: min(900px, calc(100% - 40px));
    max-width: 900px;
    max-height: calc(100dvh - 40px);
    overflow: auto;
    padding: 26px 32px 24px;
    border: 0;
    border-radius: 12px;
    color: var(--nexta-text);
    background: var(--nexta-dialog-bg);
    box-shadow: var(--nexta-dialog-shadow);
}

.nexta-site .nexta-dialog::backdrop {
    background: var(--nexta-overlay);
    backdrop-filter: blur(4px);
}

.nexta-site .dialog-head {
    position: sticky;
    z-index: 2;
    top: -26px;
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 0 12px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
    background: var(--nexta-dialog-bg);
}

.nexta-site .dialog-head h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
}

.nexta-site .dialog-head .close {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border: 1px solid var(--nexta-control-border);
    border-radius: 50%;
    color: var(--nexta-text);
    background: var(--nexta-control-bg);
    font-size: 16px;
}

.nexta-site .dialog-head .close:hover {
    color: var(--nexta-link);
    background: var(--surface);
}

.nexta-site .menu-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 34px;
}

.nexta-site .menu-primary-group,
.nexta-site .menu-secondary {
    min-width: 0;
}

.nexta-site .menu-primary-group > .eyebrow,
.nexta-site .menu-information > .eyebrow {
    display: block;
    margin-bottom: 8px;
}

.nexta-site .menu-topics .menu-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.nexta-site .menu-topics .menu-links a {
    min-height: 44px;
    padding: 7px 0;
    font-size: 21px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.nexta-site .menu-secondary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px 18px;
}

.nexta-site .menu-programmes {
    grid-column: 1 / -1;
    padding: 12px 0 16px;
    border-bottom: 1px solid var(--line);
}

.nexta-site .menu-programmes h3 {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nexta-site .menu-programmes .menu-links a {
    font-size: 18px;
    font-weight: 650;
    line-height: 1.35;
}

.nexta-site .menu-information {
    grid-column: 1 / -1;
}

.nexta-site .menu-information .menu-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}

.nexta-site .menu-information .menu-links a {
    min-height: 44px;
    font-size: 13px;
}

.nexta-site .support-menu-link {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 2px;
}

.nexta-site .dialog-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 18px;
    margin-top: 22px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

.nexta-site .search-dialog {
    max-width: 720px;
}

.nexta-site .nexta-search-form label {
    display: block;
    margin-bottom: 10px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
}

.nexta-site .search-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.nexta-site .search-row input[type="search"] {
    min-width: 0;
    flex: 1 1 auto;
    min-height: 48px;
    padding: 10px 14px;
}

.nexta-site .search-hint {
    margin: 18px 0 0;
    font-size: 12px;
}

/* Footer */
.nexta-site .site-footer {
    padding: 0 0 22px;
    color: #fff;
    background: var(--brand);
}

.nexta-site .site-footer p {
    color: #cad5ed;
}

.nexta-site .footer-top {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr 1fr 0.95fr 1.1fr;
    grid-template-areas: "brand news formats about contact";
    align-items: start;
    gap: 28px;
    padding: 32px 0 24px;
}

.nexta-site .footer-top.no-contact {
    grid-template-columns: 1.15fr 0.95fr 1fr 0.95fr;
    grid-template-areas: "brand news formats about";
}

.nexta-site .footer-brand { grid-area: brand; min-width: 0; }
.nexta-site .footer-news { grid-area: news; }
.nexta-site .footer-formats { grid-area: formats; }
.nexta-site .footer-about { grid-area: about; }
.nexta-site .contact { grid-area: contact; min-width: 0; }

.nexta-site .footer-brand > a {
    display: inline-flex;
    align-items: center;
}

.nexta-site .footer-brand img {
    display: block;
    width: 132px;
    height: 32px;
    object-fit: contain;
    object-position: left center;
}

.nexta-site .footer-brand > p {
    margin: 18px 0 14px;
    color: #fff;
    font-size: 13px;
    line-height: 1.55;
}

.nexta-site .brandline {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}

.nexta-site .brandline i {
    width: 4px;
    height: 4px;
    flex: 0 0 4px;
    border-radius: 50%;
    background: var(--accent);
}

.nexta-site .footer-nav {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.nexta-site .footer-nav > summary {
    list-style: none;
    cursor: default;
}

.nexta-site .footer-nav > summary::-webkit-details-marker {
    display: none;
}

.nexta-site .footer-nav > summary h2,
.nexta-site .contact h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.nexta-site .footer-nav:not([open]) > .footer-nav-body {
    display: none !important;
}

.nexta-site .footer-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.nexta-site .footer-menu a {
    min-height: 28px;
    padding: 4px 0;
    color: #fff;
    font-size: 12px;
    line-height: 20px;
}

.nexta-site .footer-menu a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nexta-site .footer-formats .footer-menu .sub-menu {
    margin: 0 0 6px 10px;
    padding: 0 0 0 10px;
    border-left: 1px solid #ffffff45;
    list-style: none;
}

.nexta-site .contact .email {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.nexta-site .contact > p {
    margin: 16px 0;
    color: #cad5ed;
    font-size: 12px;
    line-height: 1.6;
}

.nexta-site .socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 11px;
}

.nexta-site .socials a {
    color: #fff;
}

.nexta-site .socials a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nexta-site .footer-bottom {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 22px;
    padding: 14px 0 0;
    border-top: 1px solid #ffffff30;
    color: #cad5ed;
    font-size: 11px;
}

.nexta-site .footer-bottom a {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    color: #fff;
}

.nexta-site .footer-bottom .back {
    margin-left: auto;
}

.nexta-site .footer-bottom a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Optional wallets: rendered only after valid settings are provided. */
.nexta-site .wallet-details {
    padding: 0;
    margin: 0;
    border-top: 1px solid #ffffff30;
}

.nexta-site .wallet-details > summary {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    list-style: none;
}

.nexta-site .wallet-details > summary::-webkit-details-marker {
    display: none;
}

.nexta-site .wallet-toggle {
    font-size: 18px;
}

.nexta-site .wallet-details[open] .wallet-toggle {
    transform: rotate(45deg);
}

.nexta-site .footer-wallets {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 12px 0 24px;
}

.nexta-site .wallet-intro h2 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 16px;
}

.nexta-site .wallet-intro p {
    margin: 0;
    font-size: 12px;
}

.nexta-site .wallet-item {
    min-width: 0;
    padding: 14px;
    border: 1px solid #ffffff40;
    border-radius: 8px;
}

.nexta-site .wallet-label {
    display: block;
    margin-bottom: 8px;
    color: #cad5ed;
    font-size: 11px;
}

.nexta-site .wallet-item code {
    display: block;
    overflow-wrap: anywhere;
    color: #fff;
    font-size: 12px;
}

.nexta-site .wallet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 10px;
}

.nexta-site .wallet-actions button {
    min-height: 36px;
    padding: 5px 0;
    border: 0;
    color: var(--nexta-on-brand);
    background: transparent;
    font-size: 11px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nexta-site .wallet-status {
    grid-column: 1 / -1;
    margin: 0;
    color: #fff;
    font-size: 11px;
}

/* Fixed mobile navigation */
.nexta-site .bottom-nav {
    display: none;
}


/* Immediate light/dark theme toggle — no popover or select menu. */
.nexta-site .theme-control {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
}

.nexta-site .theme-control-trigger {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.nexta-site .theme-control-trigger:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.nexta-site .brand-header .theme-control-trigger .theme-icon-moon {
    display: block;
}

.nexta-site .brand-header .theme-control-trigger .theme-icon-sun {
    display: none;
}

:root[data-nexta-theme="dark"] .nexta-site .brand-header .theme-control-trigger .theme-icon-moon {
    display: none;
}

:root[data-nexta-theme="dark"] .nexta-site .brand-header .theme-control-trigger .theme-icon-sun {
    display: block;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-nexta-theme]) .nexta-site .brand-header .theme-control-trigger .theme-icon-moon {
        display: none;
    }

    :root:not([data-nexta-theme]) .nexta-site .brand-header .theme-control-trigger .theme-icon-sun {
        display: block;
    }
}

.nexta-site .dialog-language-setting {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.nexta-site .dialog-language-setting > span {
    color: var(--nexta-text-muted);
}


.nexta-site .topics-list a[aria-current="page"],
.nexta-site .topics > .menu-links > li > a[aria-current="page"],
.nexta-site .institution-list a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}


/* Focus remains visible against the fixed brand-blue masthead and footer. */
.nexta-site .brand-header :where(a, button, input, select, textarea, summary):focus-visible,
.nexta-site #footer :where(a, button, input, select, textarea, summary):focus-visible {
    outline-color: var(--nexta-on-brand);
}
