:root {
    --ink-950: #17211b;
    --ink-800: #26332b;
    --ink-600: #58645d;
    --ink-400: #89928c;
    --paper: #ffffff;
    --canvas: #f5f7f4;
    --line: #dfe5e0;
    --accent: #246b52;
    --accent-dark: #18523d;
    --accent-soft: #e6f1eb;
    --warning: #a35b22;
    --shadow-soft: 0 18px 55px rgba(23, 33, 27, 0.08);
    --radius-lg: 24px;
    --radius-md: 14px;
    --shell: 1180px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink-950);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(36, 107, 82, 0.35);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.shell {
    width: min(calc(100% - 40px), var(--shell));
    margin-inline: auto;
}

.top-strip {
    background: var(--ink-950);
    color: #fff;
}

.top-strip__inner {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-size: 13px;
}

.top-strip__message {
    min-width: 0;
}

.top-strip__link {
    flex: 0 0 auto;
    color: #fff;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.15s ease;
}

.top-strip__link:hover,
.top-strip__link:focus-visible {
    opacity: 1;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.navigation {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    white-space: nowrap;
    flex: 0 0 auto;
}

.brand__mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--accent);
    color: #fff;
    font-size: 19px;
    font-weight: 800;
}

.brand__name {
    color: var(--ink-950);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.navigation__menu {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.navigation__link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 9px 13px;
    color: var(--ink-600);
    text-decoration: none;
    font-size: 14px;
    font-weight: 650;
    border-radius: 9px;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.navigation__link:hover,
.navigation__link:focus-visible {
    background: var(--canvas);
    color: var(--ink-950);
}

.navigation__toggle {
    display: none;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.navigation__toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: var(--ink-950);
    border-radius: 2px;
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.navigation__toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navigation__toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.navigation__toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 11px;
    text-decoration: none;
    font-weight: 750;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--primary {
    background: var(--accent);
    color: #fff;
}

.button--primary:hover {
    background: var(--accent-dark);
}

.button--ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--ink-800);
}

.button--muted {
    background: #edf0ee;
    color: var(--ink-800);
}

.button--muted:hover {
    background: #e1e6e3;
}

.site-footer {
    position: relative;
    padding-top: 70px;
    background: var(--ink-950);
    color: #fff;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(140px, 1fr) minmax(140px, 1fr);
    gap: 50px;
    padding-bottom: 55px;
}

.site-footer__brand {
    min-width: 0;
}

.footer-logo {
    display: inline-block;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
}

.site-footer__brand p {
    max-width: 390px;
    margin: 15px 0 0;
    color: #aeb8b1;
}

.footer-heading {
    margin: 0 0 15px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.footer-links {
    display: grid;
    gap: 9px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-links a {
    color: #aeb8b1;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: #fff;
}

.site-footer__bottom {
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #89958d;
    font-size: 13px;
    text-align: center;
}

.footer_ul {
    list-style-type: disc;
}

.site-footer__bottom p {
    margin: 0;
}

.cookie-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 25px;
    padding: 18px 24px;
    background: #ffffff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 35px rgba(23, 33, 27, 0.1);
}

.cookie-panel[hidden] {
    display: none;
}

.cookie-panel__content {
    min-width: 0;
}

.cookie-panel h2 {
    margin: 0 0 4px;
    color: var(--ink-950);
    font-size: 16px;
    line-height: 1.4;
}

.cookie-panel p {
    max-width: 850px;
    margin: 0;
    color: var(--ink-600);
    font-size: 13px;
    line-height: 1.5;
}

.cookie-panel__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-panel__actions .button {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .navigation {
        gap: 20px;
    }

    .navigation__menu {
        gap: 2px;
    }

    .navigation__link {
        padding-right: 10px;
        padding-left: 10px;
        font-size: 13px;
    }

    .site-footer__grid {
        grid-template-columns: minmax(0, 1.5fr) minmax(130px, 1fr) minmax(
                130px,
                1fr
            );
        gap: 30px;
    }
}

@media (max-width: 700px) {
    .shell {
        width: min(calc(100% - 28px), var(--shell));
    }

    .top-strip__inner {
        min-height: 40px;
        justify-content: center;
        text-align: center;
    }

    .top-strip__message {
        font-size: 12px;
    }

    .top-strip__link {
        display: none;
    }

    .brand__mark {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 17px;
    }

    .brand__name {
        font-size: 15px;
    }

    .navigation {
        position: relative;
        min-height: 68px;
    }

    .navigation__toggle {
        display: block;
        margin-left: auto;
    }

    .navigation__menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 3px;
        padding: 10px 14px 14px;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 15px 30px rgba(23, 33, 27, 0.08);
        z-index: 200;
    }

    .navigation__menu.is-open {
        display: flex;
    }

    .navigation__link {
        display: flex;
        width: 100%;
        min-height: 46px;
        align-items: center;
        padding: 11px 13px;
        font-size: 15px;
    }

    .site-footer {
        padding-top: 50px;
        text-align: center;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 35px;
        padding-bottom: 40px;
    }

    .site-footer__brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .site-footer__column {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .site-footer__brand p {
        max-width: 420px;
        margin-right: auto;
        margin-left: auto;
    }

    .footer-links {
        justify-items: start;
    }

    .footer-heading {
        margin-bottom: 12px;
    }

    .site-footer__bottom {
        padding: 20px 0;
        text-align: center;
    }

    .cookie-panel {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 18px 20px;
    }

    .cookie-panel__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 420px) {
    .shell {
        width: calc(100% - 24px);
    }

    .brand__name {
        font-size: 14px;
    }

    .navigation__toggle {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .cookie-panel {
        gap: 14px;
        padding: 16px;
    }

    .cookie-panel h2 {
        font-size: 15px;
    }

    .cookie-panel p {
        font-size: 12px;
    }

    .cookie-panel__actions {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }

    .cookie-panel__actions .button {
        flex: 1 1 0;
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Navigation lists: remove bullets and default spacing */
.navigation__list,
.navigation__dropdown {
    list-style: none;
    margin: 0;
    padding: 0;
}

.navigation__list {
    display: flex;
    align-items: center;
    gap: 6px;
}

.navigation__item {
    position: relative;
}

/* Citation Generator link and arrow */
.navigation__dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0;
}

.navigation__dropdown-trigger > .navigation__link {
    padding-right: 4px;
}

.navigation__dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 40px;
    flex: 0 0 22px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink-600);
    cursor: pointer;
}

.navigation__dropdown-toggle:hover,
.navigation__dropdown-toggle:focus-visible {
    background: var(--canvas);
    color: var(--ink-950);
}

.navigation__dropdown-arrow {
    display: block;
    transition: transform 0.2s ease;
}

.navigation__item--dropdown.is-open .navigation__dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown menu */
.navigation__item--dropdown > .navigation__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    padding: 6px 0;
    margin: 0;
    list-style: none;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    z-index: 250;
}

/* Open only when hovering the arrow, or when explicitly toggled */
@media (min-width: 701px) {
    /* .navigation__item--dropdown
        > .navigation__dropdown-trigger
        > .navigation__dropdown-toggle:hover
        + .navigation__dropdown {
        display: block;
    }

    .navigation__item--dropdown.is-open > .navigation__dropdown {
        display: block;
    } */

    .navigation__item--dropdown:has(.navigation__dropdown-toggle:hover)
        > .navigation__dropdown,
    .navigation__item--dropdown > .navigation__dropdown:hover,
    .navigation__item--dropdown.is-open > .navigation__dropdown {
        display: block;
    }
}

/* Dropdown links */
.navigation__dropdown a {
    display: block;
    padding: 10px 15px;
    color: var(--ink-600);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.navigation__dropdown a:hover,
.navigation__dropdown a:focus-visible {
    background: var(--canvas);
    color: var(--ink-950);
}

@media (max-width: 900px) {
    .navigation__list {
        gap: 2px;
    }
}

/* Mobile navigation */
@media (max-width: 700px) {
    .navigation__list {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 3px;
    }

    .navigation__item {
        width: 100%;
    }

    .navigation__item--dropdown {
        position: static;
    }

    .navigation__dropdown-trigger {
        width: 100%;
    }

    .navigation__dropdown-trigger > .navigation__link {
        flex: 1;
        min-width: 0;
        padding-right: 4px;
    }

    .navigation__dropdown-toggle {
        width: 32px;
        height: 46px;
        flex: 0 0 32px;
    }

    .navigation__item--dropdown > .navigation__dropdown {
        position: static;
        min-width: 0;
        margin: 0 0 6px 12px;
        padding: 3px 0;
        border: 0;
        border-left: 2px solid var(--line);
        border-radius: 0;
        box-shadow: none;
    }

    .navigation__dropdown a {
        padding: 9px 13px;
        white-space: normal;
    }

    .navigation__item--dropdown.is-open > .navigation__dropdown {
        display: block;
    }

    /* .footer_ul {
        list-style-type: none;
    } */
}
