/* Desktop map uses the full width; mobile retains the existing vertical layout. */
@media (min-width: 701px) {
  .finder .map-workspace { grid-template-columns: minmax(0, 1fr); }
  .finder .map-navigation { min-width: 0; }
  .finder #map-tree { max-height: 520px; overflow: auto; padding: 4px 8px 12px 4px; }
  .finder #map-tree > li > button,
  .finder #map-graph > li > button { max-width: 360px; }
  .finder #map-tree > li > ul,
  .finder #map-graph > li > ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    align-items: start;
    gap: 16px;
    margin: 18px 0 0;
    padding: 16px 0 0;
    border-left: 0;
    border-top: 2px solid #397851;
  }
  .finder #map-tree > li > ul > li,
  .finder #map-graph > li > ul > li {
    min-width: 0;
    position: relative;
    padding: 0;
  }
  .finder #map-tree > li > ul > li::before,
  .finder #map-graph > li > ul > li::before {
    content: '';
    position: absolute;
    left: 18px;
    top: -18px;
    width: 0;
    height: 18px;
    border-top: 0;
    border-left: 2px solid #397851;
  }
  .finder .link-graph > ul { max-width: none; }
  .finder .map-detail { width: 100%; }
}

/* The linking tree is the single page selector above the brief. */
.finder .map-workspace > .link-graph{margin-top:0;border-top:0;padding-top:0;min-width:0}
.finder .map-workspace > .link-graph > .page-tree{max-height:520px;overflow:auto;padding:4px 8px 12px 4px}
@media(max-width:700px){.finder .map-workspace > .link-graph > .page-tree{max-height:360px}}
