/* Site header (scripts/seo/nav.mjs). Loaded before /theme.js so its light-mode media queries follow the theme switch. */
.topbar nav { gap: 1rem; }
.topbar .brand { flex: none; }
.nv { display: flex; align-items: center; gap: 0.375rem; min-width: 0; }
.nv-menus { display: none; list-style: none; margin: 0 0.5rem 0 0; padding: 0; align-items: center; gap: 0.125rem; }
.nv-menu { position: relative; }
.nv-trigger, .nv-signin {
  display: inline-flex; align-items: center; gap: 0.3rem; height: 2rem; padding: 0 0.75rem; border: 0; border-radius: 9999px; background: none;
  font: inherit; font-size: 0.8125rem; font-weight: 500; line-height: 1; color: oklch(var(--ink) 0 0 / 0.72); cursor: pointer; transition: color 150ms, background 150ms;
}
.nv-trigger svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms var(--ease-signature); }
.nv-trigger:hover, .nv-signin:hover, .nv-menu[data-open] .nv-trigger { color: var(--foreground); background: oklch(var(--ink) 0 0 / 0.08); }
.nv-menu[data-cur] .nv-trigger { color: var(--foreground); }
.nv-menu[data-open] .nv-trigger svg { transform: rotate(180deg); }
.nv-trigger:focus-visible, .nv-signin:focus-visible, .nv-item:focus-visible, .nv-all:focus-visible, .nv-drawer summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.nv-signin { display: none; }
.nv-panel {
  position: absolute; top: calc(100% + 0.5rem); left: 50%; z-index: 60; width: 18.5rem; display: grid; gap: 0.125rem; padding: 0.375rem;
  border: 1px solid var(--border); border-radius: 1rem; background: var(--background); box-shadow: 0 24px 48px -20px var(--shadow);
  opacity: 0; visibility: hidden; transform: translate(-50%, -4px); transition: opacity 140ms, transform 180ms var(--ease-signature), visibility 0s 180ms;
}
.nv-panel::before { content: ''; position: absolute; left: 0; right: 0; top: -0.6rem; height: 0.6rem; } /* hover bridge */
.nv-cols { width: 26rem; grid-template-columns: 1fr 1fr; }
.nv-menu[data-open] .nv-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
@media (hover: hover) { .nv:not([data-js]) .nv-menu:hover .nv-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; } }
.nv:not([data-js]) .nv-menu:focus-within .nv-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.nv-item { display: flex; align-items: center; gap: 0.625rem; padding: 0.5rem 0.625rem; border-radius: 0.625rem; color: var(--foreground); }
.nv-item:hover, .nv-item[aria-current="page"] { background: oklch(var(--ink) 0 0 / 0.06); }
.nv-item img { width: 20px; height: 20px; flex: none; border-radius: 5px; background: #fff; padding: 2px; object-fit: contain; }
.nv-item span { display: grid; gap: 0.125rem; min-width: 0; }
.nv-item b { font-size: 0.8125rem; font-weight: 500; }
.nv-item small { font-size: 0.75rem; color: var(--secondary-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-all { grid-column: 1 / -1; margin-top: 0.25rem; padding: 0.625rem; border-top: 1px solid var(--border); font-size: 0.8125rem; font-weight: 500; color: var(--blue); }
.nv-all:hover { text-decoration: underline; }
.nv-cta { flex: none; }
/* Phones and small tablets: one drawer. */
.nv-drawer summary { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 9999px; cursor: pointer; list-style: none; }
.nv-drawer summary::-webkit-details-marker { display: none; }
.nv-drawer summary svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.nv-drawer[open] summary { background: oklch(var(--ink) 0 0 / 0.08); }
.nv-sheet {
  position: absolute; top: calc(100% + 0.25rem); left: 0.75rem; right: 0.75rem; z-index: 60; max-height: calc(100dvh - var(--primary-nav-height) - 1rem); overflow-y: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.5rem; padding: 0.5rem 0.75rem 0.75rem; border: 1px solid var(--border); border-radius: 1rem;
  background: var(--background); box-shadow: 0 24px 48px -20px var(--shadow);
}
.nv-sheet p { grid-column: 1 / -1; margin: 0.75rem 0 0.125rem; padding: 0 0.5rem; font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint-foreground); }
.nv-sheet a { padding: 0.625rem 0.5rem; border-radius: 0.625rem; font-size: 0.9375rem; min-width: 0; overflow-wrap: anywhere; }
.nv-sheet a:hover { background: oklch(var(--ink) 0 0 / 0.05); }
@media (min-width: 56.25rem) { /* 900px */
  .nv-menus { display: flex; }
  .nv-signin { display: inline-flex; }
  .nv-drawer { display: none; }
}
@media (max-width: 23rem) { .nv-cta { padding-inline: 0.625rem; } }
@media (prefers-reduced-motion: reduce) { .nv-panel, .nv-trigger svg { transition: none; } }

/* Site footer (scripts/seo/nav.mjs FOOT). Theme switch buttons are rendered by /theme.js. */
.site-foot { border-top: 1px solid var(--border); color: var(--secondary-foreground); }
.site-foot .container { padding-block: 4rem 1.5rem; }
.site-foot .ft-top {
  display: grid; grid-template-columns: minmax(14rem, 17.5rem) minmax(0, 1fr);
  gap: 3.5rem 4rem; align-items: start;
}
.site-foot .ft-brand { min-width: 0; }
.site-foot .ft-brand .brand { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0; font-size: var(--type-body); font-weight: 500; color: var(--foreground); }
.site-foot .ft-brand .brand:hover { opacity: 0.8; }
.site-foot .ft-brand p { margin: 0.875rem 0 1.25rem; max-width: 20rem; font-size: 0.875rem; line-height: 1.55; color: var(--secondary-foreground); }
.site-foot .ft-brand p a { color: var(--foreground); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-color: var(--border-strong); }
.site-foot .ft-brand p a:hover { text-decoration-color: currentColor; }
.site-foot .ft-ctas { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.site-foot .ft-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.75rem; min-width: 0; }
.site-foot .ft-col { min-width: 0; }
.site-foot .ft-label {
  margin: 0 0 0.75rem; font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--faint-foreground);
}
.site-foot .ft-col nav {
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  height: auto; gap: 0;
}
.site-foot .ft-col a {
  display: block; padding: 0.35rem 0; font-size: 0.875rem; line-height: 1.5; text-align: left;
  color: oklch(var(--ink) 0 0 / 0.72); overflow-wrap: anywhere; transition: color 150ms;
}
.site-foot .ft-col a:hover { color: var(--foreground); }
.site-foot a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
.site-foot .bottom { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; font-size: 0.75rem; color: var(--faint-foreground); }
.site-foot .bottom a { color: inherit; }
.site-foot .bottom a:hover { color: var(--foreground); }
@media (max-width: 56.25rem) { /* 900px: brand on top, two link columns */
  .site-foot .container { padding-block: 3rem 1.25rem; }
  .site-foot .ft-top { grid-template-columns: 1fr; gap: 2.5rem; }
  .site-foot .ft-cols { grid-template-columns: 1fr 1fr; }
  .site-foot .bottom { margin-top: 2.5rem; }
}
@media (max-width: 35rem) { /* 560px: one stacked column */
  .site-foot .container { padding-block: 2.5rem 1.25rem; }
  .site-foot .ft-cols { grid-template-columns: 1fr; gap: 1.75rem; }
  .site-foot .ft-brand p { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .site-foot .ft-col a, .site-foot .bottom a, .site-foot .ft-brand p a { transition: none; } }
