/* Link blocks (X1, templates_beta/lm/components/links.html). Taps 44 px tall on phones, text 15 px or more. */
.lk { display: grid; gap: var(--s5, 20px); margin: var(--s6, 24px) 0; }
.lk-block { background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--r, 14px); padding: var(--s4, 16px); }
.lk-h { font-size: 18px; margin: 0 0 var(--s2, 8px); color: var(--text); }
.lk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 18px; font-size: 16px; }
.lk-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; min-height: 44px; border-bottom: 1px solid var(--border-soft); }
.lk-list li:last-child { border-bottom: 0; }
.lk-list a { color: var(--brand-ink); font-weight: var(--fw-semi, 600); padding: 10px 0; }
.lk-n { color: var(--muted); font-size: 14px; }
.lk-more summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: var(--fw-semi, 600); color: var(--brand-ink); font-size: 16px; }
.lk-all { margin: var(--s2, 8px) 0 0; font-size: 16px; }
.lk-all a { display: inline-flex; align-items: center; min-height: 44px; font-weight: var(--fw-bold, 700); color: var(--brand-ink); }
@media (min-width: 720px) {
  .lk-cols { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .lk-list li { min-height: 36px; }
}
/* the phone menu's extra items (header.html, switch links): Leaving near me and Search */
@media (min-width: 1241px) { .nav .nav-m { display: none; } }
/* the all-towns page (lm/pages/all_towns.py) */
.at-letters { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: var(--s4, 16px) 0; }
.at-letters a { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--r-sm, 8px); font-weight: 700; color: var(--brand-ink); background: var(--panel); }
/* the header's two menus (fix13, header.html menu_item, static/lm/menu.js). The button looks exactly like the nav links (same size, weight,
   padding), so swapping the link for it never moves the header. Wide screens: a white card under the header row, right-aligned to it, inside the
   header's own layer (z-index 30: above the hero and the list strip, under the sheets). In the phone menu: the lists open in place. */
.nm { display: contents; }
.b .nav .nm-btn:not([hidden]), .nm-btn { display: inline-flex; align-items: center; gap: 3px; font: inherit; color: var(--text); background: none; border: 0; cursor: pointer;
  font-weight: var(--fw-semi); font-size: 14px; line-height: 1.55; padding: var(--s2) 9px; border-radius: var(--r-sm); white-space: nowrap; }
.nm-btn[hidden], .nm-top[hidden] { display: none; }
.b .nav .nm-top:not([hidden]) { display: inline-flex; align-items: center; gap: 3px; }          /* with its chevron: as wide as the button that replaces it */
.no-js .nm-top .nm-chev { display: none; }          /* no script: a plain link to the hub */
.nm-btn:hover, .nm-open > .nm-btn { background: var(--surface); }
.nm-btn.nm-cur { color: var(--brand-ink); }
.nm-chev { width: 14px; height: 14px; transition: transform .15s; }
.nm-open > .nm-btn .nm-chev { transform: rotate(180deg); }
.nm-panel { position: absolute; top: calc(100% - 4px); right: 0; z-index: 32; width: min(760px, calc(100vw - 32px)); background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 20px 14px; }
.nm-panel[hidden] { display: none; }
.nm-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px 24px; }
.nm-h { margin: 0 0 6px; font-size: 14px; font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }          /* owner 21 Nov: the same grey capitals, just bigger (were 11.5px and read smaller than the links) */
.nm-col ul { list-style: none; margin: 0 0 6px; padding: 0; }
.b .nav .nm-panel a, .nm-panel a { display: block; padding: 5px 0; border-radius: 0; color: var(--text); font-size: 14px; font-weight: 400;
  text-decoration: none; white-space: normal; background: none; }
.b .nav .nm-panel a:hover, .nm-panel a:hover { color: var(--brand-ink); text-decoration: underline; background: none; }
.b .nav .nm-panel .nm-all, .nm-panel .nm-all { display: inline-block; margin-top: 6px; padding-top: 8px; color: var(--brand-ink); font-weight: var(--fw-bold); }
@media (max-width: 1240px) {          /* the nav is the menu button's panel: the item is a full-width row, its lists open under it */
  .nm { display: block; }
  .b .nav .nm-btn:not([hidden]), .nm-btn { display: flex; width: 100%; justify-content: space-between; text-align: left; min-height: 44px; padding: var(--s2) 9px; }
  .nm-chev { transform: rotate(-90deg); transition: none; }
  .nm-open > .nm-btn .nm-chev { transform: none; }
  /* 13b (owner): the menu's TOP items stand apart from the links under them: a size up and bold; an open list ends with a clear gap
     before the next top item; its headings are small muted capitals; its links regular weight */
  .b .site-head .nav > a, .b .nav .nm-top:not([hidden]), .b .nav .nm-btn:not([hidden]) { font-size: 16px; font-weight: var(--fw-bold); min-height: 46px; display: flex; align-items: center; }
  .b .nav .nm-btn { justify-content: space-between; }
  .b .site-head .nav > a[aria-current], .b .nav .nm-btn.nm-cur { color: var(--brand-ink); }
  .nm-chev { width: 16px; height: 16px; }
  .nm-panel { position: static; width: auto; border: 0; border-left: 2px solid var(--border-soft); border-radius: 0; box-shadow: none;
    padding: 0 0 4px 14px; margin: 2px 0 18px 9px; }
  .nm-cols { gap: 0 24px; }
  .nm-h { margin: 12px 0 2px; font-size: 14px; }
  .nm-col:first-child .nm-h { margin-top: 4px; }
  .b .nav .nm-panel a, .nm-panel a { min-height: 40px; display: flex; align-items: center; padding: 6px 0; font-size: 15px; font-weight: 400; }
  .b .nav .nm-panel .nm-all, .nm-panel .nm-all { font-size: 15px; font-weight: var(--fw-semi); margin-top: 4px; padding-top: 0; }
  /* the open phone menu scrolls inside itself: it hangs from the sticky header, so a long list would run off the screen out of reach */
  .site-head.open .nav { max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px); overflow-y: auto; overscroll-behavior: contain; }
  .no-js .nm { display: contents; }
}
