/* Shared site chrome: top navigation (with dropdowns) and footer.
   Linked from EVERY page. Self-contained (literal colors, selectors scoped to
   .site-nav / .site-footer) so it renders identically on pages that carry their own inline CSS.
   Markup lives in scripts/site/chrome.py; do not hand-edit it in pages. */

nav.site-nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.96); backdrop-filter: blur(12px); border-bottom: 1px solid #E5E7EB; padding: 0 24px; font-family: 'Inter', sans-serif; }
nav.site-nav .nav-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
nav.site-nav .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #111827; flex-shrink: 0; }
nav.site-nav .logo-icon { width: 36px; height: 36px; background: #2563EB; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
nav.site-nav .logo-icon svg { width: 20px; height: 20px; fill: white; }
nav.site-nav .logo-text { font-weight: 700; font-size: 18px; letter-spacing: -0.3px; }

nav.site-nav ul { list-style: none; margin: 0; padding: 0; }
nav.site-nav .nav-links { display: flex; align-items: center; gap: 6px; margin: 0 auto; }
nav.site-nav .nav-links > li { position: relative; height: 64px; display: flex; align-items: center; }
nav.site-nav .nav-links a { font-size: 14px; font-weight: 500; color: #374151; text-decoration: none; transition: color 0.2s; }
nav.site-nav .nav-links > li > a { padding: 8px 12px; border-radius: 8px; }
nav.site-nav .nav-links a:hover, nav.site-nav .nav-links a:focus-visible { color: #2563EB; }
nav.site-nav .has-sub > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }

/* Dropdown */
nav.site-nav .sub { display: none; position: absolute; top: 56px; left: 0; min-width: 240px; background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; box-shadow: 0 12px 32px rgba(17,24,39,0.12); padding: 8px; }
nav.site-nav .has-sub:hover > .sub, nav.site-nav .has-sub:focus-within > .sub { display: block; }
nav.site-nav .sub li { display: block; height: auto; }
nav.site-nav .sub a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: #374151; white-space: nowrap; }
nav.site-nav .sub a:hover, nav.site-nav .sub a:focus-visible { background: #EFF6FF; color: #2563EB; }
nav.site-nav .sub .sub-all a { font-weight: 700; color: #1D4ED8; }

nav.site-nav .nav-cta { background: #2563EB; color: #fff; padding: 9px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background 0.2s; flex-shrink: 0; }
nav.site-nav .nav-cta:hover { background: #1D4ED8; color: #fff; }
nav.site-nav .nav-links > li.nav-cta-li { display: none; }

nav.site-nav .nav-toggle-checkbox { display: none; }
nav.site-nav .nav-toggle { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0 -8px 0 0; color: #374151; cursor: pointer; flex-shrink: 0; }
nav.site-nav .nav-toggle svg { width: 24px; height: 24px; }
nav.site-nav .nav-toggle-icon-close { display: none; }

@media (max-width: 860px) {
  nav.site-nav .nav-cta { display: none; }
  nav.site-nav .nav-toggle { display: flex; margin-left: auto; }
  nav.site-nav .nav-toggle-checkbox:checked ~ .nav-inner .nav-toggle-icon-open { display: none; }
  nav.site-nav .nav-toggle-checkbox:checked ~ .nav-inner .nav-toggle-icon-close { display: block; }
  nav.site-nav .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 4px 24px 20px; background: #fff; border-bottom: 1px solid #E5E7EB; max-height: calc(100vh - 64px); overflow-y: auto; }
  nav.site-nav .nav-toggle-checkbox:checked ~ .nav-inner .nav-links { display: flex; }
  nav.site-nav .nav-links > li { height: auto; display: block; border-bottom: 1px solid #F3F4F6; }
  nav.site-nav .nav-links > li > a { display: block; padding: 13px 4px; font-size: 15px; font-weight: 600; border-radius: 0; }
  nav.site-nav .has-sub > a::after { display: none; }
  nav.site-nav .sub { display: block; position: static; min-width: 0; border: 0; box-shadow: none; border-radius: 0; padding: 0 0 10px 12px; background: transparent; }
  nav.site-nav .sub a { padding: 8px 4px; font-size: 14px; }
  nav.site-nav .nav-links > li.nav-cta-li { display: block; border-bottom: none; margin-top: 12px; }
  nav.site-nav .nav-cta-li a { display: block; text-align: center; background: #2563EB; color: #fff !important; border-radius: 8px; font-weight: 600; padding: 12px 4px !important; }
}

/* Footer */
footer.site-footer { border-top: 1px solid #E5E7EB; padding: 48px 24px 28px; background: #F9FAFB; font-family: 'Inter', sans-serif; margin: 0; }
footer.site-footer .footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
footer.site-footer .logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #111827; }
footer.site-footer .logo-icon { width: 36px; height: 36px; background: #2563EB; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
footer.site-footer .logo-icon svg { width: 20px; height: 20px; fill: white; }
footer.site-footer .logo-text { font-weight: 700; font-size: 18px; letter-spacing: -0.3px; }
footer.site-footer .footer-brand p { font-size: 14px; color: #6B7280; margin: 12px 0 0; max-width: 280px; line-height: 1.6; }
footer.site-footer .footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #111827; margin: 0 0 12px; }
footer.site-footer .footer-col a { display: block; font-size: 14px; color: #6B7280; text-decoration: none; margin: 0 0 8px; }
footer.site-footer .footer-col a:hover { color: #2563EB; }
footer.site-footer .footer-bottom { max-width: 1100px; margin: 32px auto 0; padding-top: 20px; border-top: 1px solid #E5E7EB; font-size: 13px; color: #6B7280; }
footer.site-footer .footer-bottom a { color: #2563EB; text-decoration: none; }
@media (max-width: 800px) { footer.site-footer .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { footer.site-footer .footer-grid { grid-template-columns: 1fr; } }
