/* The site footer navigation (tools/seo/footnav.mjs writes it): the homepage, the content pages and the converter pages.
 * Colours come from the page: --bone (text), --bone-dim (links) and --line, which the homepage (style/base.css) and the
 * content pages (shared/landing/landing.css) both define; a page with other names sets --fn-fg, --fn-dim and --fn-line
 * (convert/css/convert.css). Wide: two columns, a long list (fn-wide) across both; each list is a grid of cells, wider
 * for long titles (fn-long). Phone (max-width: 640px, the width footnav.mjs folds at): one column of folded <details>,
 * two link columns inside. */
.fnav { --fn-fg: var(--bone); --fn-dim: var(--bone-dim); --fn-line: var(--line);
  max-width: 1400px; margin: 0 auto 28px; padding-top: 24px; border-top: 1px solid var(--fn-line);
  font-size: 13px; line-height: 1.45; text-align: start; }
.fn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 22px 32px; }
.fn-col { min-width: 0; }
.fn-wide { grid-column: 1 / -1; }
.fnav ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 3px 20px; list-style: none; margin: 0; padding: 0; }
.fnav .fn-long ul { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.fnav li { min-width: 0; }
.fnav summary { display: block; margin: 0 0 8px; list-style: none; color: var(--fn-fg);
  font: 600 11px/1.3 var(--mono, ui-monospace, monospace); letter-spacing: 0.08em; text-transform: uppercase; }
.fnav summary::-webkit-details-marker { display: none; }
.fnav a { color: var(--fn-dim); text-decoration: none; overflow-wrap: anywhere; }
.fnav a:hover { color: var(--fn-fg); text-decoration: underline; }
.fnav a:focus-visible, .fnav summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

@media (min-width: 641px) {
  .fnav summary { pointer-events: none; }   /* wide screens show every column; only the phone folds them */
}
@media (max-width: 640px) {
  .fnav { padding-top: 0; margin-bottom: 20px; }
  .fn-grid { display: block; }
  .fn-col { border-bottom: 1px solid var(--fn-line); }
  .fnav summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin: 0; cursor: pointer; }
  .fnav summary::after { content: "+"; font-size: 16px; font-weight: 400; }
  .fnav details[open] > summary::after { content: "\2212"; }
  .fnav ul, .fnav .fn-long ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; padding-bottom: 12px; }
  .fnav li a { display: block; padding: 7px 0; }   /* a 30 px tall row: room for a finger */
}
