header {
    position: relative;
}

header.w-full nav ul,
footer .tracking-widest {
    letter-spacing: 0;
}

.institutional-toggle {
    min-height: 28px;
}

.institutional-toggle[aria-expanded="true"] {
    color: #d97706;
}

.institutional-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 60;
    min-width: 180px;
    padding: 8px 0;
    background: #fff;
    border-top: 3px solid #ffcc00;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 8px 20px rgb(27 77 62 / 16%);
    text-transform: none;
}

.institutional-menu[hidden] {
    display: none;
}

.institutional-menu a {
    display: block;
    padding: 12px 20px;
}

.institutional-menu a:hover,
.institutional-menu a:focus-visible,
.institutional-menu a[aria-current="page"] {
    color: #1b4d3e;
    background: #edf4ed;
}

header a:focus-visible,
header button:focus-visible,
footer button:focus-visible {
    outline: 2px solid #1b4d3e;
    outline-offset: 4px;
}

.statute-page {
    max-width: 1152px;
    margin: 0 auto;
    padding: 48px 40px 64px;
}

.statute-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0 32px;
}

.statute-download,
.statute-open {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.statute-download {
    background: #1b4d3e;
    color: #fff;
}

.statute-download:hover { background: #123b2f; }

.statute-open {
    border: 1px solid #1b4d3e;
    color: #1b4d3e;
}

.statute-open:hover { background: #edf4ed; }

.statute-viewer {
    overflow: hidden;
    border: 1px solid #cfdbd2;
    border-radius: 4px;
    background: #f7faf8;
}

.statute-viewer object {
    display: block;
    width: 100%;
    height: min(1000px, 80vh);
}

.statute-fallback {
    padding: 32px;
    color: #46564b;
    line-height: 1.6;
}

@media (max-width: 767px) {
    header.w-full > div > div {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    header.w-full > div > div > div:last-child {
        width: 100%;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    header input {
        max-width: 100%;
    }

    header.w-full nav > ul {
        flex-wrap: wrap;
        gap: 12px 20px;
        padding: 12px 20px;
    }

    header.w-full nav > ul > li > a,
    .institutional-toggle {
        display: flex;
        align-items: center;
        min-height: 44px;
    }

    footer {
        padding-right: 20px !important;
        padding-left: 20px !important;
    }

    footer > div > div:last-child {
        gap: 20px;
        text-align: center;
    }

    .statute-page { padding: 32px 20px 48px; }

    .statute-viewer object { height: 70vh; }
}
