/*
 * E563 header bridge: visual patterns derive from the project's own
 * laboratory/super-prototype/index.html. Only activated with the Super
 * header. Prototype CSS is unchanged and retained as an audit baseline.
 */
body.p63-super-theme .main-nav .wrap > a,
body.p63-super-theme .main-nav .super-menu-items > li > a {
    height: 46px; flex: 0 0 auto; padding: 0 13px; display: inline-flex;
    align-items: center; border-bottom: 3px solid transparent;
    font-size: 12px; font-weight: 850; letter-spacing: .045em;
    text-transform: uppercase; color: var(--p63-ink); white-space: nowrap;
}
body.p63-super-theme .main-nav .wrap > a:hover,
body.p63-super-theme .main-nav .wrap > a[aria-current="page"],
body.p63-super-theme .main-nav .super-menu-items > .current-menu-item > a,
body.p63-super-theme .main-nav .super-menu-items > li > a:hover {
    color: var(--p63-brand); border-bottom-color: var(--p63-highlight);
    background: var(--p63-soft);
}
body.p63-super-theme .main-nav .super-menu-items {
    display: flex; align-items: center; gap: 0; margin: 0;
    padding: 0; list-style: none; flex: 0 0 auto;
}
body.p63-super-theme .brand .custom-logo-link { display: inline-flex; align-items: center; }
body.p63-super-theme .brand .custom-logo { width: auto; max-width: 270px; height: auto; max-height: 70px; }
body.p63-super-theme .mast-actions { flex-wrap: wrap; }
body.p63-super-theme .drawer-search { display: flex; }
body.p63-super-theme .p63-super-search {
    display: flex; flex-wrap: wrap; gap: 7px; margin: 15px 0 22px;
}
body.p63-super-theme .p63-super-search label { width: 100%; font-size: 12px; font-weight: 800; }
body.p63-super-theme .p63-super-search input {
    flex: 1 1 125px; min-width: 0; border: 1px solid var(--p63-line);
    border-radius: 7px; padding: 9px;
}
body.p63-super-theme .p63-super-search button {
    border: 0; padding: 9px 12px; border-radius: 7px;
    color: #fff; background: var(--p63-brand); font-weight: 800;
}
body.p63-super-theme .drawer-links { display: block; }
body.p63-super-theme .drawer-links section { margin-bottom: 18px; }
body.p63-super-theme .drawer-links h3 { font-size: 13px; margin: 0 0 9px; }
body.p63-super-theme .drawer-group-links {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
    list-style: none; padding: 0; margin: 0; gap: 7px;
}
body.p63-super-theme .drawer-group-links a {
    display: block; padding: 9px; min-width: 0; overflow-wrap: anywhere;
    font-size: 12px; font-weight: 750; border-radius: 7px;
    border: 1px solid var(--p63-line); background: var(--surface);
}
body.p63-super-theme .drawer-group-links .sub-menu {
    grid-column: 1/-1; list-style: none; padding: 5px 0 2px 8px;
}
body.p63-super-theme .drawer-group-links .menu-item {
    list-style: none;
}
body.p63-super-theme.p63-super-drawer-open { overflow: hidden; }
body.p63-super-theme .main-nav .wrap > .nav-group { flex: 0 0 auto; }
@media (max-width: 760px) {
    body.p63-super-theme .masthead-main { min-height: 72px; }
    body.p63-super-theme .mobile-menu-btn { display: inline-flex; }
    body.p63-super-theme .desktop-menu-btn { display: none; }
    body.p63-super-theme .main-nav .wrap > a:nth-of-type(n+5) { display: none; }
    body.p63-super-theme .main-nav .super-menu-items > li:nth-child(n+5) { display: none; }
    body.p63-super-theme .main-nav .wrap > #topicsNav { display: none; }
    body.p63-super-theme .main-nav .wrap > .nav-mobile { display: inline-flex; }
    body.p63-super-theme .utility-links { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    body.p63-super-theme .drawer,
    body.p63-super-theme .drawer-scrim { transition: none; }
}
/* Keep the horizontally scrollable navigation inside narrow phone viewports. */
body.p63-super-theme .main-nav { max-width: 100%; overflow: hidden; }
body.p63-super-theme .main-nav > .wrap { min-width: 0; max-width: 100%; overflow-x: auto; }

/*
 * E577: display the existing 19-area WordPress taxonomy navigation and its
 * approved legacy subeditorias inside the Super Site menu, without touching
 * registered terms, permalinks or the production header implementation.
 */
body.p63-super-theme .super-canonical-nav {
    min-width: 0;
    max-width: 100%;
}
body.p63-super-theme .super-canonical-nav .p63-nav-list {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    border: 0;
    background: none;
}
body.p63-super-theme .super-canonical-nav .p63-nav-list > li {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
}
body.p63-super-theme .super-canonical-nav .p63-nav-list > li > a {
    display: block;
    padding: 9px;
    border-bottom: 1px solid var(--p63-line);
    font-size: 13px;
    overflow-wrap: anywhere;
}
body.p63-super-theme .super-canonical-nav .p63-mega {
    display: block;
    position: static;
    width: 100%;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
}
body.p63-super-theme .super-canonical-nav .p63-mega > summary {
    position: static;
    display: block;
    padding: 11px 9px;
    cursor: pointer;
    font-weight: 800;
    color: var(--p63-ink);
}
body.p63-super-theme .super-canonical-nav .p63-mega > summary:focus-visible,
body.p63-super-theme .super-canonical-nav a:focus-visible {
    outline: 3px solid var(--p63-brand);
    outline-offset: 2px;
}
body.p63-super-theme .super-canonical-nav .p63-mega-panel {
    display: block;
    position: static;
    inset: auto;
    transform: none;
    visibility: visible;
    opacity: 1;
    width: 100%;
    max-width: 100%;
    max-height: none;
    overflow: visible;
    box-shadow: none;
    padding: 0;
    border: 0;
    background: transparent;
}
body.p63-super-theme .super-canonical-nav .p63-mega-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 16px;
    padding: 12px 0;
    max-width: 100%;
}
body.p63-super-theme .super-canonical-nav .p63-mega-group {
    display: block;
    min-width: 0;
    padding: 11px;
    border: 1px solid var(--p63-line);
    border-radius: 7px;
    background: var(--surface);
}
body.p63-super-theme .super-canonical-nav .p63-mega-group h2 {
    font-size: 13px;
    line-height: 1.25;
    margin: 0 0 7px;
}
body.p63-super-theme .super-canonical-nav .p63-mega-group ul {
    display: grid;
    gap: 5px;
    padding: 0;
    margin: 0;
    list-style: none;
}
body.p63-super-theme .super-canonical-nav .p63-mega-group a {
    display: block;
    color: var(--p63-ink);
    font-size: 12px;
    line-height: 1.45;
    padding: 4px 0;
    overflow-wrap: anywhere;
}
body.p63-super-theme .nav-disclosure .super-canonical-nav .p63-nav-list > li:not(.p63-nav-editorias) {
    display: none;
}
body.p63-super-theme .nav-disclosure .super-canonical-nav .p63-mega > summary {
    display: none;
}
body.p63-super-theme .drawer .super-canonical-nav .p63-mega-grid {
    grid-template-columns: minmax(0,1fr);
    gap: 8px;
}
body.p63-super-theme .drawer .super-canonical-nav .p63-mega-group {
    padding: 9px;
}
@media (max-width: 900px) {
    body.p63-super-theme .nav-disclosure .super-canonical-nav .p63-mega-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}
@media (max-width: 600px) {
    body.p63-super-theme .nav-disclosure .super-canonical-nav .p63-mega-grid {
        grid-template-columns: minmax(0,1fr);
    }
}
/* E578: closed disclosure content is not visible or keyboard reachable. */
body.p63-super-theme .super-canonical-nav details.p63-mega:not([open]) > .p63-mega-panel {
    display: none;
    visibility: hidden;
}

/* Match the original compact masthead without replacing the official logo. */
body.p63-super-theme .masthead-main { min-height:60px; gap:12px; }
body.p63-super-theme .brand .custom-logo { max-height:46px; }
body.p63-super-theme .main-nav .wrap > a,
body.p63-super-theme .main-nav .super-menu-items > li > a { height:42px; padding:0 12px; letter-spacing:.025em; }
@media(max-width:760px) {
 body.p63-super-theme .masthead-main { min-height:54px; gap:8px; }
 body.p63-super-theme .brand .custom-logo { max-height:40px; }
 body.p63-super-theme .main-nav .wrap > a { height:40px; padding:0 8px; }
}
