/* The shared site menu and footer (written into every page by tools/site-chrome.js - edit the
   markup THERE, then re-run it). Selectors are nav.site-nav / footer.site-footer so they win over
   each page's own older nav/footer rules; colors are literal because not every page defines the
   same CSS variables. The rest of the shared look is css/theme.css. */
nav.site-nav {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    /* Content lines up with the homepage's 1280px column on wide screens. */
    padding: 12px max(24px, calc((100% - 1232px) / 2)); margin: 0;
    /* Nearly opaque instead of a backdrop blur: a blurred sticky bar re-blurs on every scroll frame,
       which made the site judder in Safari on Macs. */
    background: rgba(11, 12, 18, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    position: sticky; top: 0; z-index: 100;
    font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    line-height: 1.4;
}
nav.site-nav .logo {
    display: inline-flex; align-items: center;
    font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em;
    color: #f4f6fb; text-decoration: none; white-space: nowrap;
}
/* The icon's tile pushed to pure black (contrast keeps the white and green letters), outlined, so
   it reads as a dark tile on the dark bar - like the icons on the Download page's cards. */
nav.site-nav .logo img, footer.site-footer .logo img {
    border-radius: 8px;
    filter: contrast(1.3);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 4px 14px -4px rgba(0, 0, 0, 0.9), 0 0 18px -6px rgba(0, 255, 136, 0.45);
}
nav.site-nav .logo img { width: 30px; height: 30px; margin-right: 10px; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
nav.site-nav .logo:hover img { transform: rotate(-12deg) scale(1.08); }
nav.site-nav .logo span { color: #00ff88; }
nav.site-nav .site-links { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 0; }
nav.site-nav .site-links .nav-auth { font-size: 0.95rem; line-height: inherit; }
/* A long email would push the whole menu around; cap it (the full name is in the tooltip). */
nav.site-nav .site-links .nav-auth a {
    display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; vertical-align: bottom;
}
nav.site-nav .site-links a {
    position: relative;
    color: #9aa1b9; text-decoration: none; font-size: 0.94rem;
    padding: 8px 10px; border-radius: 8px;
    transition: color .2s, background-color .2s;
}
nav.site-nav .site-links a:hover { color: #f4f6fb; background: rgba(255, 255, 255, 0.05); }
nav.site-nav .site-links a[aria-current="page"] { color: #f4f6fb; }
nav.site-nav .site-links a[aria-current="page"]:not(.nav-cta)::after {
    content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px; border-radius: 2px;
    background: #00ff88;
}
nav.site-nav .site-links a.nav-cta {
    margin-left: 8px;
    background: #00ff88; color: #04130b; font-weight: 700;
    padding: 8px 16px;
    box-shadow: 0 0 0 0 rgba(0, 255, 136, 0);
    transition: box-shadow .25s, transform .25s;
}
nav.site-nav .site-links a.nav-cta:hover { background: #00ff88; color: #04130b; transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(0, 255, 136, .6); }

/* The phone menu button: three bars that turn into an X. */
nav.site-nav .nav-toggle {
    display: none;
    width: 42px; height: 42px; padding: 0; margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px;
    background: rgba(255, 255, 255, 0.03); cursor: pointer;
    flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
nav.site-nav .nav-toggle span {
    display: block; width: 18px; height: 2px; border-radius: 2px; background: #f4f6fb;
    transition: transform .3s cubic-bezier(.2,.7,.2,1), opacity .2s;
}
nav.site-nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.site-nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
nav.site-nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

footer.site-footer {
    padding: 64px max(24px, calc((100% - 1232px) / 2)) 28px; margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 60%);
    text-align: left; color: #9aa1b9; font-size: 0.92rem; line-height: 1.7;
    font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}
footer.site-footer .footer-grid {
    display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px;
    padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
footer.site-footer .footer-brand p { margin: 12px 0 0; max-width: 300px; }
footer.site-footer .logo {
    display: inline-flex; align-items: center;
    font-size: 1.2rem; font-weight: 700; color: #f4f6fb; text-decoration: none;
}
footer.site-footer .logo img { width: 28px; height: 28px; margin-right: 10px; }
footer.site-footer .logo span { color: #00ff88; }
footer.site-footer h4 {
    margin: 4px 0 12px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
    color: #f4f6fb;
}
footer.site-footer .footer-grid > div:not(.footer-brand) a { display: block; padding: 3px 0; }
footer.site-footer a { color: #9aa1b9; text-decoration: none; transition: color .2s; }
footer.site-footer a:hover { color: #00ff88; }
footer.site-footer p { margin: 4px 0; }
footer.site-footer .footer-bottom { margin-top: 22px; font-size: 0.85rem; }

@media (max-width: 900px) {
    footer.site-footer .footer-grid { grid-template-columns: repeat(2, 1fr); }
    footer.site-footer .footer-brand { grid-column: 1 / -1; }
}

/* Phones: with scripts on, the links fold into the menu button and drop down as a panel. */
@media (max-width: 860px) {
    nav.site-nav { padding: 10px 16px; flex-wrap: wrap; }
    nav.site-nav .site-links { gap: 2px 4px; flex: 1 1 100%; }
    .akc-js nav.site-nav .nav-toggle { display: flex; }
    .akc-js nav.site-nav .site-links {
        flex-direction: column; align-items: stretch; flex-wrap: nowrap;
        max-height: 0; overflow: hidden; opacity: 0;
        transition: max-height .4s cubic-bezier(.2,.7,.2,1), opacity .3s, padding .3s;
    }
    .akc-js nav.site-nav.open .site-links { max-height: 520px; opacity: 1; padding: 10px 0 6px; }
    .akc-js nav.site-nav .site-links a { padding: 11px 12px; font-size: 1rem; }
    .akc-js nav.site-nav .site-links .nav-auth a { max-width: none; display: block; }
    .akc-js nav.site-nav .site-links a[aria-current="page"]:not(.nav-cta)::after { left: 0; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; }
    nav.site-nav .site-links a.nav-cta { margin: 6px 0 0; text-align: center; }
    footer.site-footer { padding: 44px 16px 24px; }
}
@media (max-width: 480px) {
    footer.site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
