/* Wave 4 "misc" routes (design 003): layout only. Grid, flex, gaps via --fm-* tokens. Colours, borders, radii, shadows and fonts
   live in the shared fm-* components (assets/d3/components.css, assets/d3/components-w4-misc.css). */
.w4-page { display: grid; gap: var(--fm-space-5); align-content: start; }
.w4-page > .fm-page__head { margin-block: var(--fm-space-3) 0; }
.w4-page__body { display: grid; gap: var(--fm-space-4); min-width: 0; }
.w4-page__body > * { min-width: 0; }

/* Prime teaming leads */
.pt { display: grid; gap: var(--fm-space-4); }
body.fd-design .pt-search { display: grid; gap: var(--fm-space-3); }
.pt-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--fm-space-3); }
.pt-form .fm-field { flex: 1 1 calc(var(--fm-space-8) * 4); }
.pt-results { display: grid; gap: var(--fm-space-3); }
body.fd-design .pt-results .fm-card { display: grid; gap: var(--fm-space-2); }
.pt-results .fm-card > * { margin: 0; }

/* Support */
body.fd-design .sup-form { display: grid; gap: var(--fm-space-4); max-width: calc(var(--fm-space-8) * 10); }
.sup-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fm-space-3); }
.sup-status { min-height: var(--fm-space-5); }

/* Team page (#/team?id=) */
.w4-team__title { display: grid; gap: var(--fm-space-1); min-width: 0; }
.w4-team__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--fm-rail-right)); gap: var(--fm-space-5); align-items: start; }
.w4-team__main, .w4-team__side { display: grid; gap: var(--fm-space-4); min-width: 0; }
.w4-team__side > .fm-btn { justify-self: start; }
body.fd-design .w4-team__invite { display: grid; gap: var(--fm-space-3); }
body.fd-design .w4-team__advance { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--fm-space-3); }
body.fd-design .w4-team__split { display: grid; gap: var(--fm-space-3); }
@media (max-width: 1024px) {
  .w4-team__cols { grid-template-columns: minmax(0, 1fr); }
}

/* Inbox (#/inbox -> alerts): layout of the cards under the list */
.w4-page[data-page="alerts"] .w4-page__body { gap: var(--fm-space-4); }
.inbox-sub:empty { display: none; }
.inbox-sub { margin: 0; }
body.fd-design .inbox-email { display: grid; gap: var(--fm-space-3); }
.inbox-email[hidden] { display: none; }
.inbox-email > * { margin: 0; }
.inbox-weekly { display: flex; align-items: flex-start; gap: var(--fm-space-2); cursor: pointer; }
.inbox-weekly input { flex: none; margin-top: var(--fm-space-1); }
.inbox-follows ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--fm-space-1); }
.inbox-follows li { display: flex; align-items: center; justify-content: space-between; gap: var(--fm-space-3); min-width: 0; }
.inbox-follows li a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.fd-design .inbox-watch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--fm-space-3); }
.inbox-watch small { display: block; }

/* Dashboard (#/desk) */
body.fd-design .dk-card { display: grid; gap: var(--fm-space-3); }
.dk-card > * { margin: 0; }
.dk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(calc(var(--fm-space-8) * 3), 1fr)); gap: var(--fm-space-3); }
.dk-tile { text-decoration: none; }
.dk-opp-list { display: grid; gap: var(--fm-space-3); justify-items: start; }
.dk-opp-list > .fm-list { justify-self: stretch; width: 100%; }
.dk-row .fm-row__aside { gap: var(--fm-space-1) var(--fm-space-2); }
.dk-row .fm-row__title { text-decoration: none; }

/* Market charts (#/charts) */
.w4-charts { display: grid; gap: var(--fm-space-4); }
.w4-team__splithead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--fm-space-2); }

/* Directory (#/directory): the intro and browse cards stack their parts with a gap */
body.fd-design .vd-intro, body.fd-design .vd-browse-card, body.fd-design .vd-sample, body.fd-design .vd-browse-card + .fm-card { display: grid; gap: var(--fm-space-3); }
body.fd-design :is(.vd-intro, .vd-browse-card, .vd-sample) > * { margin: 0; }
body.fd-design .vd-intro > .fm-btn { justify-self: start; }
.vd-directory-results { display: grid; gap: var(--fm-space-3); }
