nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    row-gap: 0;
    padding-top: clamp(14px, 3vw, 20px);
    padding-bottom: clamp(14px, 3vw, 20px);
    padding-left: var(--page-pad-left);
    padding-right: var(--page-pad-right);
    background: var(--nav-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(26, 29, 36, 0.04), 0 6px 24px rgba(26, 29, 36, 0.05);
}
.nav-toggle {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-2);
    color: var(--primary);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.nav-toggle-icon { font-size: 1.1rem; line-height: 1; }
.nav-toggle-close { display: none; }
nav.is-open .nav-toggle-open { display: none; }
nav.is-open .nav-toggle-close { display: inline-block; }
.logo {
    font-weight: 600;
    font-size: 1.15rem;
    text-transform: none;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.logo img {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    margin-right: 8px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.10);
    background: #fff;
}
.logo-name { display: inline-flex; letter-spacing: -0.06em; }
.logo-name .accent { color: var(--accent); }
.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-left: auto;
}
.nav-links a {
    text-decoration: none;
    color: var(--subtle);
    font-weight: 500;
    font-size: clamp(12px, 3.2vw, 14px);
    margin-left: 0;
    transition: 0.2s;
    white-space: nowrap;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a[aria-current="page"] {
    color: var(--accent);
    font-weight: 600;
}
.nav-links .pill-link {
    background: var(--chip-bg);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 999px;
}
@media (max-width: 768px) {
    .logo {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 1.02rem;
    }
    .nav-toggle {
        display: inline-flex;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        width: 100%;
        flex: 1 0 100%;
        order: 3;
        margin-left: 0;
        gap: 0;
        padding-top: 0;
        border-top: none;
    }
    nav.is-open .nav-links {
        display: flex;
        padding-top: 12px;
        margin-top: 4px;
        border-top: 1px solid var(--border);
    }
    .nav-links a {
        white-space: normal;
        justify-content: flex-start;
        padding: 14px 6px;
        border-radius: 8px;
        border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    }
    .nav-links a:last-child {
        border-bottom: none;
    }
    .nav-links .pill-link {
        margin-top: 8px;
        padding: 12px 16px;
        justify-content: center;
        text-align: center;
        border-bottom: none;
        border: 1px solid var(--border);
    }
}
@media (min-width: 769px) {
    .nav-links { display: flex !important; }
}

.site-chrome-footer > * {
    min-width: 0;
}
.site-chrome-footer {
    background: var(--footer-bg);
    color: var(--primary);
    padding: clamp(48px, 10vw, 80px) var(--page-pad-right) clamp(40px, 8vw, 64px) var(--page-pad-left);
    padding-bottom: calc(clamp(40px, 8vw, 64px) + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
    gap: clamp(28px, 5vw, 40px);
    overflow: visible;
    margin-top: auto;
}
.site-chrome-footer .footer-brand {
    grid-column: 1 / -1;
}
@media (min-width: 900px) {
    .site-chrome-footer .footer-brand {
        grid-column: span 2;
    }
}
.site-chrome-footer .footer-thanks-row {
    grid-column: 1 / -1;
}
.site-chrome-footer .footer-bottom {
    grid-column: 1 / -1;
    padding-top: clamp(20px, 4vw, 28px);
    margin-top: clamp(8px, 2vw, 12px);
    border-top: 1px solid var(--border);
}
.footer-brand h2 {
    font-family: inherit;
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 10px;
    letter-spacing: 0;
}
.footer-links h4 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rfu-text-muted, var(--subtle));
    margin-bottom: 12px;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a {
    color: var(--subtle);
    text-decoration: none;
    font-size: 14px;
    opacity: 1;
    transition: 0.3s;
}
.footer-links a:hover { opacity: 1; color: var(--accent); }
.footer-tagline {
    opacity: 0.65;
    font-size: 14px;
    font-weight: 400;
}
.footer-tagline a {
    color: inherit;
    font-weight: 600;
    text-underline-offset: 2px;
}
.footer-github {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    color: var(--subtle);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    opacity: 0.72;
    transition: opacity 0.3s, color 0.3s;
}
.footer-github:hover {
    opacity: 1;
    color: var(--accent);
}
.footer-github i {
    font-size: 1.35rem;
    line-height: 1;
}
.footer-supporter-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-supporter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-2, rgba(255, 255, 255, 0.5));
    text-decoration: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.footer-supporter:hover {
    border-color: rgba(224, 74, 0, 0.45);
    background: var(--rfu-accent-soft, rgba(224, 74, 0, 0.1));
    color: var(--accent);
}
.footer-supporter img {
    flex: 0 0 auto;
    max-height: 28px;
    width: auto;
    object-fit: contain;
}
.footer-supporter--icon img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}
.footer-bottom p {
    color: var(--subtle);
    font-size: 13px;
    line-height: 1.55;
}
.footer-bottom a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.footer-bottom a:hover { text-decoration: underline; }
@media (max-width: 992px) {
    .site-chrome-footer {
        grid-template-columns: 1fr;
    }
    .site-chrome-footer .footer-brand {
        grid-column: 1 / -1;
    }
}
body.home .site-chrome-footer {
    border-radius: 22px 22px 0 0;
    margin-top: 4px;
}
@media (max-width: 768px) {
    .footer-links li { margin-bottom: 14px; }
    .footer-links a {
        font-size: 15px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    .footer-brand p { font-size: 15px; line-height: 1.55; }
}
